Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIE object errors #2

Open
iraizo opened this issue Aug 16, 2021 · 1 comment
Open

PIE object errors #2

iraizo opened this issue Aug 16, 2021 · 1 comment

Comments

@iraizo
Copy link

iraizo commented Aug 16, 2021

relocation R_X86_64_32S against .rodata' can not be used when making a PIE object; recompile with -fPIE` errors like that happen when compiling main.obf.s with a simple hello world program.

@iraizo iraizo changed the title PIE objec errors PIE object errors Aug 16, 2021
@iraizo
Copy link
Author

iraizo commented Aug 16, 2021

ld.lld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in /tmp/main-d92640.o
>>> referenced by main.cpp
>>>               /tmp/main-d92640.o:(__cxx_global_var_init)

ld.lld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in /tmp/main-d92640.o
>>> referenced by main.cpp
>>>               /tmp/main-d92640.o:(__cxx_global_var_init)

ld.lld: error: relocation R_X86_64_32 cannot be used against symbol __dso_handle; recompile with -fPIC
>>> defined in /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/11.1.0/crtbeginS.o
>>> referenced by main.cpp
>>>               /tmp/main-d92640.o:(__cxx_global_var_init)

ld.lld: error: undefined symbol: std::ios_base::Init::Init()
>>> referenced by main.cpp
>>>               /tmp/main-d92640.o:(__cxx_global_var_init)

ld.lld: error: undefined symbol: std::ios_base::Init::~Init()
>>> referenced by main.cpp
>>>               /tmp/main-d92640.o:(__cxx_global_var_init)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant