[Bug binutils/19547] New: strip --strip-unneeded adds back section symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=19547 Bug ID: 19547 Summary: strip --strip-unneeded adds back section symbols Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: arvidjaar at gmail dot com Target Milestone: --- As discussed on mailing list (https://sourceware.org/ml/binutils/2016-01/msg00330.html) strip from recent binutils will add back section symbols even though they are not needed for relocations. Opening bug report as requested. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/19547] strip --strip-unneeded adds back section symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=19547 --- Comment #2 from Andrei Borzenkov --- Created attachment 8949 --> https://sourceware.org/bugzilla/attachment.cgi?id=8949&action=edit Source module before strip -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/19547] strip --strip-unneeded adds back section symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=19547 --- Comment #3 from Andrei Borzenkov --- Created attachment 8950 --> https://sourceware.org/bugzilla/attachment.cgi?id=8950&action=edit After strip using binutils 2.17 -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/19547] strip --strip-unneeded adds back section symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=19547 --- Comment #4 from Andrei Borzenkov --- Created attachment 8951 --> https://sourceware.org/bugzilla/attachment.cgi?id=8951&action=edit After strip using binutils 2.24 -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/19547] strip --strip-unneeded adds back section symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=19547 Andrei Borzenkov changed: What|Removed |Added Status|WAITING |NEW --- Comment #5 from Andrei Borzenkov --- Attached is all_video.module which is postprocessed for final run-time object. Post processing is done using bor@bor-Latitude-E5450:/tmp$ objcopy -R .modename -R .moddeps all_video.module all_video.mod.tmp bor@bor-Latitude-E5450:/tmp$ printf "all_video\0" > modname bor@bor-Latitude-E5450:/tmp$ printf "efi_gop\0efi_uga\0video_bochs\0video_cirrus\0" > moddeps bor@bor-Latitude-E5450:/tmp$ objcopy --add-section .modname=modname --add-section .moddeps=moddeps all_video.mod.tmp bor@bor-Latitude-E5450:/tmp$ strip --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note.gnu.gold-version -R .note.GNU-stack -R .note -R .comment -R .ARM.exidx all_video.mod.tmp One version is produced using binutils 2.17, another - 2.24. bor@bor-Latitude-E5450:/tmp$ LC_ALL=C objdump -t all_video.mod.2.17 all_video.mod.2.17: file format elf32-i386 SYMBOL TABLE: no symbols bor@bor-Latitude-E5450:/tmp$ LC_ALL=C objdump -t all_video.mod.2.24 all_video.mod.2.24: file format elf32-i386 SYMBOL TABLE: ld .text .text ld .data .data ld .module_license .module_license ld .bss .bss ld .moddeps .moddeps ld .modname .modname -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/19547] strip --strip-unneeded adds back section symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=19547 --- Comment #7 from Andrei Borzenkov --- I attached 3 x86 objects. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/19547] strip --strip-unneeded adds back section symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=19547 --- Comment #10 from Andrei Borzenkov --- (In reply to H.J. Lu from comment #9) > A testcase: > Thanks! Do you still need it from me or is it OK? -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/19547] strip --strip-unneeded adds back section symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=19547 --- Comment #12 from Andrei Borzenkov --- It's pretty much the same. Thank you! -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/19547] strip --strip-unneeded adds back section symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=19547 --- Comment #14 from Andrei Borzenkov --- Comment on attachment 8952 --> https://sourceware.org/bugzilla/attachment.cgi?id=8952 A patch Yes, this patch restores previous (2.17) behavior. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils