security_flags.inc: elfutils on ARM fails with PIE flags
PATCH 1/2 security_flags.inc: elfutils on ARM fails with PIE flags
From: Denys Dmytriyenko <[email protected]>
The error messages look like this:R_ARM_TLS_LE32 relocation not permitted in shared object
--- meta/conf/distro/include/security_flags.inc | 1 + 1 file changed, 1 insertion(+)
meta/conf/distro/include/security_flags.inc +1 -0
@@ -13,6 +13,7 @@ SECURITY_CFLAGS_pn-webkit-gtk_powerpc = "" # arm specific security flag issues SECURITY_CFLAGS_pn-lttng-tools_arm = "${SECURITY_NO_PIE_CFLAGS}" +SECURITY_CFLAGS_pn-elfutils_arm = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-aspell = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-beecrypt = "${SECURITY_NO_PIE_CFLAGS}"
Signature · 1 line
2.2.0
PATCH 2/2 security_flags.inc: disable PIE for bash due to issues in mkbuiltins
From: Denys Dmytriyenko <[email protected]>
As bash builds a native tool called mkbuiltins, it fails with PIE flags:
ld: mkbuiltins.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
Affects at least version 3.2 of bash.
--- meta/conf/distro/include/security_flags.inc | 1 + 1 file changed, 1 insertion(+)
meta/conf/distro/include/security_flags.inc +1 -0
@@ -16,6 +16,7 @@ SECURITY_CFLAGS_pn-lttng-tools_arm = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-elfutils_arm = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-aspell = "${SECURITY_NO_PIE_CFLAGS}" +SECURITY_CFLAGS_pn-bash = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-beecrypt = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-blktrace = "${SECURITY_NO_PIE_CFLAGS}" # Curl seems to check for FORTIFY_SOURCE in CFLAGS, but even assigned
Signature · 1 line
2.2.0
Re: [PATCH 2/2] security_flags.inc: disable PIE for bash due to issues in mkbuiltins
Quoted 7 lines · Denys Dmytriyenko
From: Denys Dmytriyenko <[email protected]>
As bash builds a native tool called mkbuiltins, it fails with PIE flags:
ld: mkbuiltins.o: relocation
R_X86_64_32against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPICAffects at least version 3.2 of bash.
I am a little worried about this one. Which architecture were you building for and is this just 3.x of bash or 4.x as well? I'd like to understand why we haven't seen this before...
Cheers,
Richard
Quoted 20 lines
Signed-off-by Denys Dmytriyenko <[email protected]>--- meta/conf/distro/include/security_flags.inc | 1 + 1 file changed, 1 insertion(+)meta/conf/distro/include/security_flags.inc +1
-0@@ -16,6 +16,7 @@ SECURITY_CFLAGS_pn-lttng-tools_arm = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-elfutils_arm = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-aspell = "${SECURITY_NO_PIE_CFLAGS}" +SECURITY_CFLAGS_pn-bash = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-beecrypt = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-blktrace = "${SECURITY_NO_PIE_CFLAGS}" # Curl seems to check for FORTIFY_SOURCE in CFLAGS, but even assignedSignature · 1 line
2.2.0
Re: [PATCH 2/2] security_flags.inc: disable PIE for bash due to issues in mkbuiltins
Quoted 8 lines · Richard Purdie
Quoted 4 lines · Denys Dmytriyenko
From: Denys Dmytriyenko <[email protected]>
As bash builds a native tool called mkbuiltins, it fails with PIE flags:
Quoted 7 lines
Quoted 3 lines
ld: mkbuiltins.o: relocation
R_X86_64_32against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPICAffects at least version 3.2 of bash.
I am a little worried about this one. Which architecture were you building for and is this just 3.x of bash or 4.x as well? I'd like to understand why we haven't seen this before…
If its a tool used during building bash, then you need to adjust CFLAGS_FOR_BUILD and make sure that bash’s build system is not mixing things up. I am not sure if we need to disable PIE completely, there should be a better fix for this.
Quoted 32 lines
Cheers,
Richard
Quoted 20 lines
Signed-off-by Denys Dmytriyenko <[email protected]>---
meta/conf/distro/include/security_flags.inc | 1 +1 file changed, 1 insertion(+)meta/conf/distro/include/security_flags.inc +0
-0@@ -16,6 +16,7 @@ SECURITY_CFLAGS_pn-lttng-tools_arm = "${SECURITY_NO_PIE_CFLAGS}"SECURITY_CFLAGS_pn-elfutils_arm = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-aspell = "${SECURITY_NO_PIE_CFLAGS}" +SECURITY_CFLAGS_pn-bash = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-beecrypt = "${SECURITY_NO_PIE_CFLAGS}" SECURITY_CFLAGS_pn-blktrace = "${SECURITY_NO_PIE_CFLAGS}" # Curl seems to check for
FORTIFY_SOURCEin CFLAGS, but even assignedSignature · 1 line
2.2.0Signature · 4 lines
_______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core