ARM linker stub changes - placement, PIC
Daniel Jacobowitz
drow@false.org
Tue Feb 24 03:10:00 GMT 2009
Hi Christophe, others,
I've just finished testing these patches. The first one changes stubs
to go after input sections by default; my reasoning (as we discussed
last year) is that you can set the start address of sections in linker
scripts, but not the end address. And fixed start addresses are
likely to be referenced by external entities, like a boot loader or a
hardware interrupt controller. So this should stop dropping stubs on
top of the reset vector. No change in testsuite results, but a lot
of churn in the expected output.
The second changes "add pc, pc, ip" to "add ip, pc, ip; bx ip" when
the target is Thumb. It turns out that add pc does not mode switch on
ARM v6, but does on ARM v7 (sometimes, under some complicated set of
conditions). Clearly better to avoid it. This fixes three crashes
when I locally converted the linker dump tests to execution tests.
Comments welcome! Credit to Joseph for the code in the first patch.
--
Daniel Jacobowitz
CodeSourcery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld-stubs-after-input.patch
Type: text/x-diff
Size: 41248 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090224/51801424/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld-add.patch
Type: text/x-diff
Size: 7473 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090224/51801424/attachment-0001.bin>
More information about the Binutils
mailing list