[forwarded from http://bugs.debian.org/435444] running on the attached ix86 shared object, seen on powerpc and x86_64 as well. objcopy --only-keep-debug puzzle puzzle.debug_ok objcopy -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc --only-keep-debug puzzle puzzle.debug_broken not seen with cvs 20070426, seen with cvs 20070713 and cvs 20070801
Created attachment 1944 [details] test binary readelf -s puzzle.debug_broken shows garbled symbols.
omitting -R .debug_aranges avoids the garbled symbols
seen with cvs 20070529
This patch http://sourceware.org/ml/binutils-cvs/2007-05/msg00158.html causes this regression. Alan, I couldn't find where it was discussed. Can you look into it? Thanks.
The problem was introduced here: http://sourceware.org/ml/binutils/2007-05/msg00433.html "my change to assign_file_positions_for_load_sections means that we can leave bfd section flags unchanged." Except that we can't without further modifying objcopy to stop section contents being copied.
http://sourceware.org/ml/binutils-cvs/2007-08/msg00023.html
thanks!