[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ld 2.16 bug in linker script ?
From: |
Philippe Biondi |
Subject: |
ld 2.16 bug in linker script ? |
Date: |
Sun, 9 Oct 2005 17:28:15 +0200 (CEST) |
Hi,
I used this minimal linker script :
SECTIONS {
/DISCARD/ : {
*(.stab*)
*(.comment)
*(.note)
}
_GLOBAL_OFFSET_TABLE_ = .;
all : {*(.text, .rodata, .rdata, .data, .bss) }
}
that worked as expected with ld 2.15. Now, with ld 2.16,
the line
addl $_GLOBAL_OFFSET_TABLE_+[.-.L6], %ebx
is assembled :
0000000C 81C35A000000 add ebx,0x5a ; (i.e after .text)
instead of :
0000000C 81C3F5FFFFFF add ebx,0xfffffff5 ; (i.e. before .txt)
But if I use change the order of the lines in the linker script :
SECTIONS {
_GLOBAL_OFFSET_TABLE_ = .;
/DISCARD/ : {
*(.stab*)
*(.comment)
*(.note)
}
all : {*(.text, .rodata, .rdata, .data, .bss) }
}
it works with ld 2.15 and ld 2.16. So I'm happy that my problem is solved,
but I think these two linker scripts should be equivalent.
--
Philippe Biondi <phil@ secdev.org> SecDev.org
Computer Security/R&D http://www.secdev.org
PGP KeyID:3D9A43E2 FingerPrint:C40A772533730E39330DC0985EE8FF5F3D9A43E2
- ld 2.16 bug in linker script ?,
Philippe Biondi <=