This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

linker and debug section question


I noticed a change in the linker behaviour between binutils 2.24 and
top-of-tree and was wondering if it was intentional or accidental.

I noticed that some test programs I was compiling with the latest GCC
and binutils were much larger then before and after some digging I found
the difference was that executables compiled with -O2 or -O3 (no -g) and
linked with a top-of-tree ld had these sections:

  [29] .debug_aranges    MIPS_DWARF      00000000 000918 0000a8 00      0   0  8
  [30] .debug_info       MIPS_DWARF      00000000 0009c0 0002e2 00      0   0  1
  [31] .debug_abbrev     MIPS_DWARF      00000000 000ca2 000172 00      0   0  1
  [32] .debug_line       MIPS_DWARF      00000000 000e14 00020a 00      0   0  1
  [33] .debug_frame      MIPS_DWARF      00000000 001020 000050 00      0   0  4
  [34] .debug_str        MIPS_DWARF      00000000 001070 000243 01  MS  0   0  1
  [35] .debug_loc        MIPS_DWARF      00000000 0012b3 0000bb 00      0   0  1
  [36] .debug_ranges     MIPS_DWARF      00000000 001370 000040 00      0   0  8

But a program compiled with the latest GCC and linked with the 2.24 ld
only has:

  [28] .debug_frame      MIPS_DWARF      00000000 00089c 000050 00      0   0  4

This is making some executables (like coremark) 3 times larger than
they were with the 2.24 ld.  I know I can strip out the debug information
but I was wondering why the behaviour changed.

Steve Ellcey
sellcey@imgtec.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]