https://sourceware.org/bugzilla/show_bug.cgi?id=23503
Bug ID: 23503 Summary: -Ttext= doesn't work right with GNU property Product: binutils Version: 2.32 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: hjl.tools at gmail dot com CC: ian at airs dot com Target Milestone: --- [hjl@gnu-cfl-1 gold-2]$ cat x.s .section ".note.gnu.property", "a" .ifdef __64_bit__ .p2align 3 .else .p2align 2 .endif .long 1f - 0f /* name length. */ .long 3f - 1f /* data length. */ /* NT_GNU_PROPERTY_TYPE_0 */ .long 5 /* note type. */ 0: .asciz "GNU" /* vendor name. */ 1: .ifdef __64_bit__ .p2align 3 .else .p2align 2 .endif /* GNU_PROPERTY_X86_ISA_1_USED */ .long 0xc0000000 /* pr_type. */ .long 5f - 4f /* pr_datasz. */ 4: .long 0xa 5: .ifdef __64_bit__ .p2align 3 .else .p2align 2 .endif 3: .text .globl _start _start: ret [hjl@gnu-cfl-1 gold-2]$ make /usr/bin/as -defsym __64_bit__=1 -o x.o x.s ld.bfd -Ttext=0x1000200 -Tdata=0x2000000 -o x1 x.o ld.gold -Ttext=0x1000200 -Tdata=0x2000000 -o x1.gold x.o nm x1 | grep " _start" 0000000001000200 T _start <<<<<<< ld is OK. nm x1.gold | grep " _start" 0000000001000220 T _start <<<<<<<< gold is off by 0x20. [hjl@gnu-cfl-1 gold-2]$ -- 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