[Bug binutils/27836] New: Illegal memory accessed
https://sourceware.org/bugzilla/show_bug.cgi?id=27836 Bug ID: 27836 Summary: Illegal memory accessed Product: binutils Version: 2.36.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: shaohua.li at inf dot ethz.ch Target Milestone: --- -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/27836] Illegal memory accessed
https://sourceware.org/bugzilla/show_bug.cgi?id=27836 --- Comment #1 from Shaohua Li --- Created attachment 13428 --> https://sourceware.org/bugzilla/attachment.cgi?id=13428&action=edit poc file for `readelf -w` -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/27836] Illegal memory accessed
https://sourceware.org/bugzilla/show_bug.cgi?id=27836 --- Comment #2 from Shaohua Li --- Compiler: gcc11 & clang12 Platform: Ubuntu 20.04 LTS, x86_64 Summary: I compiled Binutils with gcc11 and clang12 separately, then run with `readelf -w poc`. I found that the last line in two outputs were different. For gcc11, it was: "0044 004e 100e4500 FDE..." For clang12, it was: "0044 100e4500 FDE..." Then I checked the source code and found that the guard in dwarf.c:8802 would be evaluated differently in two compiled binaries. The root cause is in dwarf.c:8797, where `look_for` would be a negative value in the clang12-compiled binary. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/27837] New: Consider allowing mix of -r / --relax by ignoring --relax.
https://sourceware.org/bugzilla/show_bug.cgi?id=27837 Bug ID: 27837 Summary: Consider allowing mix of -r / --relax by ignoring --relax. Product: binutils Version: 2.36.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: slyfox at inbox dot ru Target Milestone: --- This is a forward of https://bugs.gentoo.org/788901 bug by Petr Ĺ abata. Petr uses LDFLAGS+=-Wl,--relax system-wide. glibc (and ghc) occasionally use `ld -r` for partial linking (and apply $LDFLAGS for it). binutils does not allow such a mix: $ touch a.c $ LANG=C h gcc -Wl,--relax -r a.c -o a /usr/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../x86_64-pc-linux-gnu/bin/ld: --relax and -r may not be used together collect2: error: ld returned 1 exit status Our options are to: 1. Filter out -Wl,--relax flag downstream and don't pass it to glibc 2. Tweak glibc to pass -Wl,--no-relax in `ld -r` contexts I wonder if binutils could ignore -Wl,--relax altogether for partial linking. Thank you! -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/27836] Illegal memory accessed
https://sourceware.org/bugzilla/show_bug.cgi?id=27836 Alan Modra changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |WORKSFORME Assignee|unassigned at sourceware dot org |amodra at gmail dot com --- Comment #3 from Alan Modra --- The only way I could reproduce a readelf segv with your testcase and compilers I had available was to introduce an error in the source, replacing line 8802 with if (0 && look_for <= saved_start) I think you may have found a bug in clang12 rather than an error in readelf. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/27594] build processes broken by changed space handling
https://sourceware.org/bugzilla/show_bug.cgi?id=27594 --- Comment #6 from Thomas Wolff --- Please fix this by simply reverting to the 2.35 version. Some testing reveals that the solution proposed by Johannes Schindelin actually worked already in 2.35, i.e. spaces can be embedded by quoting, e.g. windres -c 65001 --preprocessor '"/my bin/gcc" "-E"' so there was no need for the 2.36 patch at all in the first place. -- You are receiving this mail because: You are on the CC list for the bug.