OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Dec 11, 2017 8:52 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Relocation R_X86_64_32 against undefined symbol
PostPosted: Thu Nov 09, 2017 10:05 am 
Offline

Joined: Tue Feb 28, 2012 6:14 am
Posts: 4
Hi,

I am working on a hypervisor (https://github.com/hschauhan/xvisor-x86_64). While it compiles fine with GCC 6.3, it doesn't compile with GCC 7.2 that comes preinstalled with ubuntu 17.10. I get the following error:

/usr/bin/ld: /home/hchauhan/sandbox/xvisor-x86_64/build/arch/x86/cpu/cpu.o: relocation R_X86_64_32 against undefined symbol `_bootstrap_stack_start' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:344: recipe for target '/home/hchauhan/sandbox/xvisor-x86_64/build/vmm_tmp1.elf' failed

_bootstrap_stack_start is a symbol defined in linker script with PROVIDE. Previous GCC is able to link but new one is unable to do so. _bootstrap_stack_start is used to load %esp under .code32

I searched the internet for the failure and it looks like it has something to do with default visibility of symbols in gcc 7.2. I have tried -fvisibility etc but to no avail.

Any pointer would be of help.

Regards
Himanshu


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group