[Bug ld/22655] gcc unable to compile assembly with -nostdlib

2018-03-31 Thread jeremip11 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22655

Jeremi  changed:

   What|Removed |Added

 CC||jeremip11 at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/22655] gcc unable to compile assembly with -nostdlib

2018-01-08 Thread calculuswhiz at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22655

--- Comment #6 from Zach  ---
Ah, thanks. Got it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/22655] gcc unable to compile assembly with -nostdlib

2018-01-07 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22655

H.J. Lu  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from H.J. Lu  ---
(In reply to Zach from comment #4)
> 
> Why don't I need this flag in 32 bit? Why didn't I need this in the previous

There is no relocation overflow in 32-bit.

> version? Was this unintentional?

Your GCC is configured with --enable-default-pie.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/22655] gcc unable to compile assembly with -nostdlib

2018-01-07 Thread calculuswhiz at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22655

--- Comment #4 from calculuswhiz at gmail dot com ---
Ah, good. Compiles successfully with -no-pie.

I don't really understand why this works though.

Why don't I need this flag in 32 bit? Why didn't I need this in the previous
version? Was this unintentional?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/22655] gcc unable to compile assembly with -nostdlib

2018-01-07 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22655

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #3 from H.J. Lu  ---
Please pass -no-pie to the gcc driver.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/22655] gcc unable to compile assembly with -nostdlib

2017-12-31 Thread calculuswhiz at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22655

--- Comment #2 from calculuswhiz at gmail dot com ---
You mean use the verbose flag? Because I don't call `as` and `ld` myself. It's
breaking at `ld`.
I have other test programs as well in the above repo, if you find those easier
to look at. This was just the most recent one I could confirm that works. It
looks like some of the assembler directives are now causing ld to break
somehow.

Compilation with -v:
% gcc -nostdlib quine.sx -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --enable-multilib --disable-werror
--enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.2.1 20171128 (GCC) 
COLLECT_GCC_OPTIONS='-nostdlib' '-v' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/cc1 -E -lang-asm -quiet -v quine.sx
-mtune=generic -march=x86-64 -fno-directives-only -o /tmp/ccarmazI.s
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/include
 /usr/local/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-nostdlib' '-v' '-mtune=generic' '-march=x86-64'
 as -v --64 -o /tmp/ccavrnxG.o /tmp/ccarmazI.s
GNU assembler version 2.29.1 (x86_64-pc-linux-gnu) using BFD version (GNU
Binutils) 2.29.1
COMPILER_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-nostdlib' '-v' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/collect2 -plugin
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/liblto_plugin.so
-plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccgD9dwE.res --build-id --eh-frame-hdr
--hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie
-L/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1
-L/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/../../..
/tmp/ccavrnxG.o
/usr/bin/ld: /tmp/ccavrnxG.o: relocation R_X86_64_32S against `.text' can not
be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/22655] gcc unable to compile assembly with -nostdlib

2017-12-31 Thread sch...@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22655

Andreas Schwab  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-12-31
 Ever confirmed|0   |1

--- Comment #1 from Andreas Schwab  ---
Please show exactly how the assembler and linker are called.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils