public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/63461] New: Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable
@ 2014-10-05 15:24 akiss at inf dot u-szeged.hu
  2014-10-05 15:25 ` [Bug c/63461] " akiss at inf dot u-szeged.hu
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: akiss at inf dot u-szeged.hu @ 2014-10-05 15:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63461

            Bug ID: 63461
           Summary: Inconsistent behaviour on ARM64 when inline assembly
                    with .text directive is followed by a static variable
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: akiss at inf dot u-szeged.hu

On ARM64/Ubuntu 14.04.1 with the stock gcc (Ubuntu/Linaro 4.8.2-19ubuntu1) I've
experienced the following: 

First, I wrote a macro with inline assembly containing a .text directive
followed by a static variable (still in the macro). Then, I expanded that macro
multiple times. The generated assembly output contains a .data directive before
the first variable declaration but not afterwards.

This caused problems with dynamically linking shared libraries in WebKit
(https://bugs.webkit.org/show_bug.cgi?id=137434).


gcc details:

Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--disable-libitm --disable-libsanitizer --disable-libquadmath --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-arm64/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-arm64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-arm64
--with-arch-directory=arm64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-multiarch --disable-werror --enable-checking=release
--build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/63461] Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable
  2014-10-05 15:24 [Bug c/63461] New: Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable akiss at inf dot u-szeged.hu
@ 2014-10-05 15:25 ` akiss at inf dot u-szeged.hu
  2014-10-05 15:26 ` akiss at inf dot u-szeged.hu
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: akiss at inf dot u-szeged.hu @ 2014-10-05 15:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63461

--- Comment #1 from Akos Kiss <akiss at inf dot u-szeged.hu> ---
Created attachment 33649
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33649&action=edit
Example C source code


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/63461] Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable
  2014-10-05 15:24 [Bug c/63461] New: Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable akiss at inf dot u-szeged.hu
  2014-10-05 15:25 ` [Bug c/63461] " akiss at inf dot u-szeged.hu
  2014-10-05 15:26 ` akiss at inf dot u-szeged.hu
@ 2014-10-05 15:26 ` akiss at inf dot u-szeged.hu
  2014-10-05 15:33 ` schwab@linux-m68k.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: akiss at inf dot u-szeged.hu @ 2014-10-05 15:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63461

--- Comment #2 from Akos Kiss <akiss at inf dot u-szeged.hu> ---
Created attachment 33650
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33650&action=edit
Preprocessed source


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/63461] Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable
  2014-10-05 15:24 [Bug c/63461] New: Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable akiss at inf dot u-szeged.hu
  2014-10-05 15:25 ` [Bug c/63461] " akiss at inf dot u-szeged.hu
@ 2014-10-05 15:26 ` akiss at inf dot u-szeged.hu
  2014-10-05 15:26 ` akiss at inf dot u-szeged.hu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: akiss at inf dot u-szeged.hu @ 2014-10-05 15:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63461

--- Comment #3 from Akos Kiss <akiss at inf dot u-szeged.hu> ---
Created attachment 33651
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33651&action=edit
Assembly output


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/63461] Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable
  2014-10-05 15:24 [Bug c/63461] New: Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable akiss at inf dot u-szeged.hu
                   ` (2 preceding siblings ...)
  2014-10-05 15:26 ` akiss at inf dot u-szeged.hu
@ 2014-10-05 15:33 ` schwab@linux-m68k.org
  2014-10-05 15:45 ` mikpelinux at gmail dot com
  2014-10-06  8:08 ` akiss at inf dot u-szeged.hu
  5 siblings, 0 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2014-10-05 15:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63461

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Andreas Schwab <schwab@linux-m68k.org> ---
Don't do that then.  Switching sections behind the compiler's back is
undefined.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/63461] Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable
  2014-10-05 15:24 [Bug c/63461] New: Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable akiss at inf dot u-szeged.hu
                   ` (3 preceding siblings ...)
  2014-10-05 15:33 ` schwab@linux-m68k.org
@ 2014-10-05 15:45 ` mikpelinux at gmail dot com
  2014-10-06  8:08 ` akiss at inf dot u-szeged.hu
  5 siblings, 0 replies; 7+ messages in thread
From: mikpelinux at gmail dot com @ 2014-10-05 15:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63461

--- Comment #5 from Mikael Pettersson <mikpelinux at gmail dot com> ---
Use .pushsection and .popsection .


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/63461] Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable
  2014-10-05 15:24 [Bug c/63461] New: Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable akiss at inf dot u-szeged.hu
                   ` (4 preceding siblings ...)
  2014-10-05 15:45 ` mikpelinux at gmail dot com
@ 2014-10-06  8:08 ` akiss at inf dot u-szeged.hu
  5 siblings, 0 replies; 7+ messages in thread
From: akiss at inf dot u-szeged.hu @ 2014-10-06  8:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63461

--- Comment #6 from Akos Kiss <akiss at inf dot u-szeged.hu> ---
Thanks for the feedback!


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-10-06  8:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-05 15:24 [Bug c/63461] New: Inconsistent behaviour on ARM64 when inline assembly with .text directive is followed by a static variable akiss at inf dot u-szeged.hu
2014-10-05 15:25 ` [Bug c/63461] " akiss at inf dot u-szeged.hu
2014-10-05 15:26 ` akiss at inf dot u-szeged.hu
2014-10-05 15:26 ` akiss at inf dot u-szeged.hu
2014-10-05 15:33 ` schwab@linux-m68k.org
2014-10-05 15:45 ` mikpelinux at gmail dot com
2014-10-06  8:08 ` akiss at inf dot u-szeged.hu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).