New: 2018.02.09 fails to build libzlib with full RELRO protection
https://bugs.busybox.net/show_bug.cgi?id=11616
Bug ID: 11616
Summary: 2018.02.09 fails to build libzlib with full RELRO
protection
Product: buildroot
Version: 2018.02.9
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: mail at kkrach.de
CC: buildroot at uclibc.org
Target Milestone: ---
Created attachment 7911
--> https://bugs.busybox.net/attachment.cgi?id=7911&action=edit
defconfig which fails
Compiling libzlib the given defconfig (powerpc, GCC 7.3, BR2_RELRO_FULL=y) fails with
sysroot/usr/lib/Scrt1.o: In function `_start':
(.text+0x42): undefined reference to `main'
collect2: error: ld returned 1 exit status
Switching RELRO off or to partial, compiles successfully.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11616] 2018.02.09 fails to build libzlib with full RELRO protection
https://bugs.busybox.net/show_bug.cgi?id=11616
--- Comment #1 from Karl Krach <[email protected]> --- Created attachment 7916
--> https://bugs.busybox.net/attachment.cgi?id=7916&action=edit
compile output with full RELRO (failed)
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11616] 2018.02.09 fails to build libzlib with full RELRO protection
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11616
--- Comment #2 from Karl Krach <[email protected]> --- Created attachment 7921
--> https://bugs.busybox.net/attachment.cgi?id=7921&action=edit
compile output with partial RELRO (succeeded)
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11616] 2018.02.09 fails to build libzlib with full RELRO protection
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11616
Karl Krach <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #7911|application/octet-stream |text/plain
mime type| |Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11616] 2018.02.09 fails to build libzlib with full RELRO protection
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11616
--- Comment #3 from Matt Weber <[email protected]> --- Could you do a build with this stock config in Buildroot and verify the issue is repeatable?
qemu_ppc64_e5500_defconfig
This doesn't isolate the issue to the specific architecture but should simplify your defconfig so I can help further.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11616] 2018.02.09 fails to build libzlib with full RELRO protection
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11616
--- Comment #4 from Thomas Petazzoni <[email protected]> ---
Matt: the bug is reported against 2018.02.9, i.e the LTS branch and not 2018.11 or master. Back in 2018.02.x, the support in the wrapper for RELRO was not there.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11616] 2018.02.09 fails to build libzlib with full RELRO protection
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11616
--- Comment #5 from Matt Weber <[email protected]> --- Tho(In reply to Thomas Petazzoni from comment #4)
Oh right. So then for this failure case it is a known issue that the ordering of linker steps in most packages are not correct to support RELRO full. Which is what lead to using the toolchain wrapper to adjust ordering as the current solution.
Karl, are you able to bump versions to 2018.11 or next month to the new LTS? If not I can help you find the series of commits to add to your LTS that enable the toolchain wrapper method, however you'd have to carry your own LTS branch locally for this to work.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11616] 2018.02.09 fails to build libzlib with full RELRO protection
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11616
--- Comment #6 from Karl Krach <[email protected]> ---
Matt, for me partial RELRO is fine for now. I will switch to the next LTS when available. Thanks.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11616] 2018.02.09 fails to build libzlib with full RELRO protection
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11616
--- Comment #7 from Matt Weber <[email protected]> --- If you did need to do full RELRO, you could pull the following commits in on your LTS to change the toolchain-wrapper behavior.
git cherry-pick d4f5801027f3329fb6c2cd096f3396d3cd067390 01d8a0a9455f9408819d7f135fba5139f0672507 7484c1c3b8065d6f2f5a67607e9917ecfea022eb f10822d151085bcbfecd0ecf2542ac5f5623fd9d
Care to mark this one closed?
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11616] 2018.02.09 fails to build libzlib with full RELRO protection
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11616
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WONTFIX--- Comment #8 from Thomas Petazzoni <[email protected]> --- Full RELRO has been fixed post-2018.02 by changing the toolchain-wrapper. This is too invasive to backport in 2018.02, so only later Buildroot versions will have proper full RELRO support.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.