[Bug binutils/23610] New: objcopy is not removing the sectiones like .rela.plt and rela.dyn.
https://sourceware.org/bugzilla/show_bug.cgi?id=23610 Bug ID: 23610 Summary: objcopy is not removing the sectiones like .rela.plt and rela.dyn. Product: binutils Version: 2.32 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: kamleshbhalui at gmail dot com Target Milestone: --- Created attachment 11233 --> https://sourceware.org/bugzilla/attachment.cgi?id=11233&action=edit patch that fix the issue. Hi All, we have the requirement in our inhouse product were we strip out the relocations sections like “.rela.plt” and “rela.dyn” from the executable by objcopy/strip utility. i.e simple example like $cat test.c int g; int main() { printf ("Hello World\n"); return g; } $gcc -fpic -shared test.c $readelf -S a.out [ 6] .gnu.version_rVERNEED 0468 0468 0020 A 4 1 8 [ 7] .rela.dyn RELA 0488 0488 00d8 0018 A 3 0 8 [ 8] .rela.plt RELA 0560 0560 0018 0018 AI 322 8 $objcopy -R .rela.plt -R rela.dyn a.out $readelf -S a.out [ 6] .gnu.version_rVERNEED 0468 0468 0020 A 4 1 8 [ 7] .rela.dyn RELA 0488 0488 00d8 0018 A 3 0 8 [ 8] .rela.plt RELA 0560 0560 0018 0018 AI 322 8 $objcopy --remove-relocations=.rela.plt --remove-relocations=.rela.dyn a.out $readelf -S a.out [ 6] .gnu.version_rVERNEED 0468 0468 0020 A 4 1 8 [ 7] .rela.dyn RELA 0488 0488 00d8 0018 A 3 0 8 [ 8] .rela.plt RELA 0560 0560 0018 0018 AI 322 8 we upgrade the binutils from version 2.25 to 2.29 and please note that we are able to strip out the relocation sections w.r.t 2.25 and this regression was from following changes that had a some major code refactoring in the remove-relocations front in 2.29 and which made our case fail . https://github.com/qtumproject/x86-toolchain/blob/master/binutils-2.29/binutils/ChangeLog-2016 and also note that ,"objcopy -R .rela.text test.o "for the object file works as expected and for executable were relocation sections was not removed like above is expected behavior by objcopy/strip utility ? We made some changes and same is attached( objcopy.patch ) that fix the issue . But before we move forward on the fix ,we would like to hear any thoughts /comments from experts on the issue/patch will be highly helpful for us. Thank you ,awaiting for any insights/comments . -- 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/23611] New: objcopy is not removing the sectiones like .rela.plt and rela.dyn.
https://sourceware.org/bugzilla/show_bug.cgi?id=23611 Bug ID: 23611 Summary: objcopy is not removing the sectiones like .rela.plt and rela.dyn. Product: binutils Version: 2.32 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: kamleshbhalui at gmail dot com Target Milestone: --- Created attachment 11234 --> https://sourceware.org/bugzilla/attachment.cgi?id=11234&action=edit patch that fix the issue. Hi All, we have the requirement in our inhouse product were we strip out the relocations sections like “.rela.plt” and “rela.dyn” from the executable by objcopy/strip utility. i.e simple example like $cat test.c int g; int main() { printf ("Hello World\n"); return g; } $gcc -fpic -shared test.c $readelf -S a.out [ 6] .gnu.version_rVERNEED 0468 0468 0020 A 4 1 8 [ 7] .rela.dyn RELA 0488 0488 00d8 0018 A 3 0 8 [ 8] .rela.plt RELA 0560 0560 0018 0018 AI 322 8 $objcopy -R .rela.plt -R rela.dyn a.out $readelf -S a.out [ 6] .gnu.version_rVERNEED 0468 0468 0020 A 4 1 8 [ 7] .rela.dyn RELA 0488 0488 00d8 0018 A 3 0 8 [ 8] .rela.plt RELA 0560 0560 0018 0018 AI 322 8 $objcopy --remove-relocations=.rela.plt --remove-relocations=.rela.dyn a.out $readelf -S a.out [ 6] .gnu.version_rVERNEED 0468 0468 0020 A 4 1 8 [ 7] .rela.dyn RELA 0488 0488 00d8 0018 A 3 0 8 [ 8] .rela.plt RELA 0560 0560 0018 0018 AI 322 8 we upgrade the binutils from version 2.25 to 2.29 and please note that we are able to strip out the relocation sections w.r.t 2.25 and this regression was from following changes that had a some major code refactoring in the remove-relocations front in 2.29 and which made our case fail . https://github.com/qtumproject/x86-toolchain/blob/master/binutils-2.29/binutils/ChangeLog-2016 and also note that ,"objcopy -R .rela.text test.o "for the object file works as expected and for executable were relocation sections was not removed like above is expected behavior by objcopy/strip utility ? We made some changes and same is attached( objcopy.patch ) that fix the issue . But before we move forward on the fix ,we would like to hear any thoughts /comments from experts on the issue/patch will be highly helpful for us. Thank you ,awaiting for any insights/comments . -- 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/23611] objcopy is not removing the sections like .rela.plt and rela.dyn.
https://sourceware.org/bugzilla/show_bug.cgi?id=23611 Kamlesh Kumar changed: What|Removed |Added Summary|objcopy is not removing the |objcopy is not removing the |sectiones like .rela.plt|sections like .rela.plt and |and rela.dyn. |rela.dyn. -- 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/23611] objcopy is not removing the sections like .rela.plt and rela.dyn.
https://sourceware.org/bugzilla/show_bug.cgi?id=23611 Kamlesh Kumar changed: What|Removed |Added CC||nickc at redhat dot com -- 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/23611] objcopy is not removing the sections like .rela.plt and rela.dyn.
https://sourceware.org/bugzilla/show_bug.cgi?id=23611 Kamlesh Kumar changed: What|Removed |Added CC||andrew.burgess at embecosm dot com -- 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/23611] objcopy is not removing the sections like .rela.plt and rela.dyn.
https://sourceware.org/bugzilla/show_bug.cgi?id=23611 Kamlesh Kumar changed: What|Removed |Added Target||x86 Host||linux Build||linux -- 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/23059] OOM-Bug in cxxfilt (binuitils-2.30-15ubuntu1)
https://sourceware.org/bugzilla/show_bug.cgi?id=23059 Kamlesh Kumar changed: What|Removed |Added CC||kamleshbhalui at gmail dot com --- Comment #3 from Kamlesh Kumar --- ChangeLog which fixes this. 2018-12-22 Jason Merrill Remove support for demangling GCC 2.x era mangling schemes. * cplus-dem.c: Remove cplus_mangle_opname, cplus_demangle_opname, internal_cplus_demangle, and all subroutines. (libiberty_demanglers): Remove entries for ancient GNU (pre-3.0), Lucid, ARM, HP, and EDG demangling styles. (cplus_demangle): Remove 'work' variable. Don't call internal_cplus_demangle. -- 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