Hello, I am trying to understand one issue that we started to hit after switching from binutils 2.20 to binutils 2.21 and was hoping that someone from this list could help me. To set this into a context, we are cross-building HelenOS for ia64-pc-linux-gnu.
The following instruction: addl r36 = @ltoff(@fptr(__entry#)), gp gets linked as either (ld 2.20): 28806: 40 02 04 00 48 20 addl r36=0,r1 or (ld 2.21): 24846: 40 02 07 8c 48 20 addl r36=9056,r1 The latter is wrong as the computed address lies far beyond our .got and even far beyond the data segment. The linker script remains the same, the only thing which changed is ld version. The linker script for both cases is this: STARTUP(LIBC_PATH/arch/UARCH/src/entry.o) ENTRY(__entry) PHDRS { text PT_LOAD FLAGS(5); data PT_LOAD FLAGS(6); } SECTIONS { . = 0x4000 + SIZEOF_HEADERS; .init : { *(.init); } :text .text : { *(.text .text.*); *(.rodata .rodata.*); } :text . = . + 0x4000; .got : { _gp = .; *(.got .got.*); } :data .data : { *(.opd); *(.data .data.*); *(.sdata); } :data .tdata : { _tdata_start = .; *(.tdata); _tdata_end = .; _tbss_start = .; *(.tbss); _tbss_end = .; } :data _tls_alignment = ALIGNOF(.tdata); .bss : { *(.sbss); *(.scommon); *(COMMON); *(.bss); } :data /DISCARD/ : { *(*); } } I would be grateful for any hint that would explain the sudden runaway gp offset. Regards, Jakub _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils