[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/19623] regression: missing relocation for symbols in discarded s
From: |
address@hidden |
Subject: |
[Bug ld/19623] regression: missing relocation for symbols in discarded section |
Date: |
Wed, 24 Feb 2016 08:38:24 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19623
--- Comment #4 from address@hidden ---
Reading further in the source code (and guessing a lot) maybe the we have a
section named A with VMA = 0 which means it requires no immediate relocation.
Later on when the linker adds new object files, it adds sections and suddenly
the section A gets a VMA != 0 for some reason. Then the symbols in section A
would need to be relocated.
In the old code (or new code with the "fix") the linker will see that section A
has VMA = 0 and will skip relocations in the first pass. Later once VMA != 0 it
will relocate such symbols. The result is a binary with all symbols perfectly
relocated.
In the new code the linker will not detect the special case of VMA = 0 and will
relocate immediately. Since VMA = 0 the relocation will have no effect. Yet
since relocation was done, flag for further relocations is cleared (if there is
such a flag), not sure. Later on, section A gets a VMA != 0. The linker will
ignore the section since it has already done relocation. The result is a binary
with some symbols not relocated.
Browsing the code I have not found whether a successful relocations sets a flag
to prevent further relocations, yet the story could explain the different
results the way I see them. Also I cannot explain why clearing the contents
does affect the result in the way it does. Maybe my explanation model is
incomplete (or completely wrong).
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/19623] New: regression: missing relocation for symbols in discarded section, address@hidden, 2016/02/12
- [Bug ld/19623] regression: missing relocation for symbols in discarded section, address@hidden, 2016/02/12
- [Bug ld/19623] regression: missing relocation for symbols in discarded section, nickc at redhat dot com, 2016/02/23
- [Bug ld/19623] regression: missing relocation for symbols in discarded section, address@hidden, 2016/02/24
- [Bug ld/19623] regression: missing relocation for symbols in discarded section, address@hidden, 2016/02/24
- [Bug ld/19623] regression: missing relocation for symbols in discarded section,
address@hidden <=
- [Bug ld/19623] regression: erroneous relocation for symbols in absolute section (vma == 0), address@hidden, 2016/02/25
- [Bug ld/19623] regression: erroneous relocation for symbols in absolute section (vma == 0), address@hidden, 2016/02/25