bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/22136] Support marking "debug" info files with special ET_


From: hjl.tools at gmail dot com
Subject: [Bug binutils/22136] Support marking "debug" info files with special ET_GNU_DEBUG_* values.
Date: Fri, 15 Sep 2017 19:03:42 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22136

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
So the problem is the invalid .dynamic section.  Can we just drop
.dynamic section with "objcopy --only-keep-debug", like this:

diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 23a949d1ad..9ca25a38ae 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -4206,6 +4206,7 @@ strip_main (int argc, char *argv[])
     break;
   case OPTION_ONLY_KEEP_DEBUG:
     strip_symbols = STRIP_NONDEBUG;
+    handle_remove_section_option (".dynamic");
     break;
   case OPTION_KEEP_FILE_SYMBOLS:
     keep_file_symbols = 1;
@@ -4582,6 +4583,7 @@ copy_main (int argc, char *argv[])

   case OPTION_ONLY_KEEP_DEBUG:
     strip_symbols = STRIP_NONDEBUG;
+    handle_remove_section_option (".dynamic");
     break;

   case OPTION_KEEP_FILE_SYMBOLS:

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]