[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/13720] New: Ld 2.22 computes wrong symbol values
From: |
matthieu.lemerre at cea dot fr |
Subject: |
[Bug ld/13720] New: Ld 2.22 computes wrong symbol values |
Date: |
Tue, 21 Feb 2012 13:29:11 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=13720
Bug #: 13720
Summary: Ld 2.22 computes wrong symbol values
Product: binutils
Version: 2.22
Status: NEW
Severity: critical
Priority: P2
Component: ld
AssignedTo: address@hidden
ReportedBy: address@hidden
Classification: Unclassified
Hello,
ld version 2.22 gives wrong symbol values for some symbols.
To be precise, it seems to compute the right value for the symbol, but
uses a bad value when the symbol is used.
Here are some relevant parts of the map file:
# Here, the value for iSegCode0 is correctly computed
0x0000000000000008 iSegCode0 = (ABSOLUTE (.) - ABSOLUTE
(tabGDT))
# Later, the value is not used correctly
0x0000000000117002 0x2 SHORT 0x113008 iSegCode0
# With ld version 2.20, the correct value is used:
0x0000000000117002 0x2 SHORT 0x8 iSegCode0
For another symbol, I have:
0x0000000000000020 offset_master_PIC = ((ABSOLUTE (.) - ABSOLUTE
(tabIDT)) >> 0x3)
And if I link an assembly file that uses this symbol
(it does a movb $offset_master_PIC, %al), I get this error:
(.text+0x7): relocation truncated to fit: R_386_8 against symbol
If I change my assembly file to do (movw $offset_master_PIC, %eax)
instead and use objdump, I can see that offset_master_PIC has a
completely wrong value (which explains the truncation error).
Somehow it seems that the value of the symbol gets overwritten. We
tried using valgrind to see if it was a simple memory error without
success.
We can reproduce the error in the complete projet; when trying to
create a simpler case, we did not manage to reproduce the error. We
tried to simplify our linker script, but with simple modifications
(e.g. changing the order of sections) the error did not occur.
The error already appeared with ld version 21.51.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug ld/13720] New: Ld 2.22 computes wrong symbol values,
matthieu.lemerre at cea dot fr <=