qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Fix missing symbols in .rela.plt sections


From: Loïc Minier
Subject: [Qemu-devel] [PATCH] Fix missing symbols in .rela.plt sections
Date: Sun, 17 Jan 2010 12:59:32 +0100

        Hi there,

 Static builds of qemu on x86-64 (and probably i386) fail with:
gcc -I/home/lool/git/savannah/qemu/slirp -Werror -m64 -Wold-style-definition 
-Wold-style-declaration -I. -I/home/lool/git/savannah/qemu -U_FORTIFY_SOURCE 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes 
-Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings 
-Wmissing-prototypes -fno-strict-aliasing  -I/home/lool/git/savannah/qemu/fpu 
-I/home/lool/git/savannah/qemu/tcg -I/home/lool/git/savannah/qemu/tcg/x86_64  
-I.. -I/home/lool/git/savannah/qemu/target-arm -DNEED_CPU_H 
-I/home/lool/git/savannah/qemu/linux-user 
-I/home/lool/git/savannah/qemu/linux-user/arm -O2 -g  -static -Wl,--warn-common 
-m64 -g  -Wl,-T../config-host.ld -Wl,-T,/home/lool/git/savannah/qemu/x86_64.ld  
-o qemu-arm main.o syscall.o strace.o mmap.o signal.o thunk.o elfload.o 
linuxload.o uaccess.o gdbstub.o flatload.o gdbstub-xml.o nwfpe/fpa11.o 
nwfpe/fpa11_cpdo.o nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o 
nwfpe/single_cpdo.o nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o 
-Wl,--whole-archive ../libuser/libuser.a libqemu.a -Wl,--no-whole-archive -lrt 
-lpthread  -lm
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libc.a(elf-init.o): In 
function `__libc_csu_irel':
(.text+0xd4): undefined reference to `__rela_iplt_end'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libc.a(elf-init.o): In 
function `__libc_csu_irel':
(.text+0xe5): undefined reference to `__rela_iplt_start'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libc.a(elf-init.o): In 
function `__libc_csu_irel':
(.text+0x100): undefined reference to `__rela_iplt_start'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libc.a(elf-init.o): In 
function `__libc_csu_irel':
(.text+0x10a): undefined reference to `__rela_iplt_start'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libc.a(elf-init.o): In 
function `__libc_csu_irel':
(.text+0x10f): undefined reference to `__rela_iplt_start'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libc.a(elf-init.o): In 
function `__libc_csu_irel':
(.text+0x114): undefined reference to `__rela_iplt_start'
collect2: ld returned 1 exit status

 This is due to changes in binutils + glibc, qemu's linker script need
 to be adjusted to include these symbols.  qemu's scripts weren't
 copying the .rela.iplt section at all, so I included this section and
 the __rela_iplt_start and __rela_iplt_end arount it.

 Tested by building qemu in static and shared mode for the
 
arm-softmmu,i386-softmmu,x86_64-softmmu,arm-linux-user,i386-linux-user,x86_64-linux-user
 target-list; I also ran qemu for almost all combinations.

   Thanks,
-- 
Loïc Minier

Attachment: 0001-Fix-missing-symbols-in-.rela.plt-sections.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]