|
From: | calculuswhiz at gmail dot com |
Subject: | [Bug ld/22655] New: gcc unable to compile assembly with -nostdlib |
Date: | Sun, 31 Dec 2017 07:33:14 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22655 Bug ID: 22655 Summary: gcc unable to compile assembly with -nostdlib Product: binutils Version: 2.29 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: calculuswhiz at gmail dot com Target Milestone: --- I'm trying to compile this pure x64 program to an ELF. Source: https://github.com/calculuswhiz/Assembly-Syntax-Definition/blob/master/test/quine.sx. I use this: gcc -nostdlib quine.sx And this: gcc -nostdlib -fPIC quine.sx But it always just gives me this: /usr/bin/ld: /tmp/cca3rc8T.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 I know for sure this worked in the past (Last I know for sure was on 28Jan17). However, compiling this 32-bit code still works: https://github.com/calculuswhiz/Assembly-Syntax-Definition/blob/master/test/quine32.sx Using: gcc -nostdlib -m32 quine32.sx What's going on? -- You are receiving this mail because: You are on the CC list for the bug.
[Prev in Thread] | Current Thread | [Next in Thread] |