diff options
author | Loïc Minier <lool@dooz.org> | 2010-01-31 12:22:52 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-02-06 22:22:27 +0100 |
commit | 845f2c2812d9ed24b36c02a3d06ee83aeafe8b49 (patch) | |
tree | aeb8099a61d91c9e1ed8c49959360831072b760d /x86_64.ld | |
parent | 02ecd9fc73dc781a5ac0d8333c8071e6a28fe0e1 (diff) | |
download | qemu-845f2c2812d9ed24b36c02a3d06ee83aeafe8b49.zip qemu-845f2c2812d9ed24b36c02a3d06ee83aeafe8b49.tar.gz qemu-845f2c2812d9ed24b36c02a3d06ee83aeafe8b49.tar.bz2 |
Fix missing symbols in .rel/.rela.plt sections
Fix .rel.plt sections in the output to not only include .rel.plt
sections from the input but also the .rel.iplt sections and to define
the hidden symbols __rel_iplt_start and __rel_iplt_end around
.rel.iplt as otherwise we get undefined references to these when
linking statically to a multilib libc.a. This fixes the static build
under i386.
Apply similar logic to rela.plt/.iplt and __rela_iplt/_plt_start/_end to
fix the static build under amd64.
Signed-off-by: Loïc Minier <lool@dooz.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'x86_64.ld')
-rw-r--r-- | x86_64.ld | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -35,8 +35,20 @@ SECTIONS .rela.got : { *(.rela.got) } .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } + .rel.plt : + { + *(.rel.plt) + PROVIDE_HIDDEN (__rel_iplt_start = .); + *(.rel.iplt) + PROVIDE_HIDDEN (__rel_iplt_end = .); + } + .rela.plt : + { + *(.rela.plt) + PROVIDE_HIDDEN (__rela_iplt_start = .); + *(.rela.iplt) + PROVIDE_HIDDEN (__rela_iplt_end = .); + } .init : { KEEP (*(.init)) |