Bug 14187 - gold incorrectly requires hexadecimals to start with 0x with -Ttext/-Tdata/-Tbss
: gold incorrectly requires hexadecimals to start with 0x with -Ttext/-Tdata/-Tbss
Status: NEW
Product: binutils
Classification: Unclassified
Component: gold
: unspecified
: P2 minor
: ---
Assigned To: Ian Lance Taylor
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-05-30 22:51 UTC by Mike Frysinger
Modified: 2012-08-08 20:51 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Frysinger 2012-05-30 22:51:49 UTC
$ echo '' | gcc -x c - -o test.o -c
$ ld test.o -o a.out -Ttext 7C00
ld: fatal error: -Ttext: invalid option value (expected an integer): 7C00
$ ld test.o -o a.out -Ttext 0x7C00
<works>
$ ld test.o -o a.out --section-start=.text=7C00
<works>

this does not match the GNU linker (or its documentation) where it says:
  -Tbss=org
  -Tdata=org
  -Ttext=org
    Same as --section-start, with ".bss", ".data" or ".text" as the
sectionname.

  --section-start=sectionname=org
    ...  org must be a single hexadecimal integer; for compatibility with other
linkers, you may omit the leading 0x usually associated with hexadecimal
values.
Comment 1 jeffall 2012-07-27 07:53:51 UTC
I found the same bug. This makes it so that you cannot compile Grub while gold
is installed.