Skip to content
This repository has been archived by the owner on Mar 25, 2018. It is now read-only.

Trouble with default hardened GCC (eg. Gentoo-Hardened or Ubuntu 16.10+) #2

Open
p-kraszewski opened this issue Feb 24, 2017 · 1 comment

Comments

@p-kraszewski
Copy link

If compilation gives something like:

  = note: /usr/bin/ld: /storage/Projects/IntermezzOS_bare/target/x86_64-unknown-intermezzos-gnu/release/build/intermezzos-8ccbbf2f886be67d/out/libboot.a(boot.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
          /usr/bin/ld: final link failed: Nie da się wyświetlić sekcji na wyjściu!
          collect2: error: ld returned 1 exit status

this is due to hardened compiler chain. To fix it, you need to change x86_64-unknown-intermezzos-gnu.json by adding "-no-pie" to "pre-link-args".

Hope this helps!

And yes, IntermezzOS book is an excellent lecture!

@p-kraszewski p-kraszewski changed the title Trouble with default hardened GCC (eh. Gentoo-Hardened or Ubuntu 16.10+) Trouble with default hardened GCC (eg. Gentoo-Hardened or Ubuntu 16.10+) Feb 24, 2017
@steveklabnik
Copy link
Member

Thank you!

I'm confused as to why a "hardened" compiler wouldn't want PIE....

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

No branches or pull requests

2 participants