public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [gold, strip] Question about the changed offset when stripping
@ 2013-11-29 11:57 Alexander Ivchenko
  2013-11-29 18:55 ` Alan Modra
  0 siblings, 1 reply; 22+ messages in thread
From: Alexander Ivchenko @ 2013-11-29 11:57 UTC (permalink / raw)
  To: binutils, Ian Lance Taylor, Cary Coutant

Hi,

Have a little question about gold and strip, I have a linked by gold
binary with:

>readelf -S out/test_binary
 ....
  [18] .got              PROGBITS        00003f30 002f30 000024 00  WA  0   0  4
  [19] .got.plt          PROGBITS        00003f54 002f54 0000a8 00  WA  0   0  4
  [20] .bss              NOBITS          00004000 003000 000010 00  WA  0   0  8
  [21] .comment          PROGBITS        00000000 003000 000010 01  MS  0   0  1
  [22] .debug_info       PROGBITS        00000000 003010 00db90 00      0   0  1
  [23] .debug_abbrev     PROGBITS        00000000 010ba0 000b66 00      0   0  1
  [24] .debug_loc        PROGBITS        00000000 011706 000fc7 00      0   0  1
 ....

Then I strip it (with trunk strip):
>strip-new --strip-debug out/test_binary -o out/test_binary_stripped

>readelf -S out/test_binary_stripped

 ....
  [18] .got              PROGBITS        00003f30 002f30 000024 00  WA  0   0  4
  [19] .got.plt          PROGBITS        00003f54 002f54 0000a8 00  WA  0   0  4
  [20] .bss              NOBITS          00004000 002ffc 000010 00  WA  0   0  8
  [21] .comment          PROGBITS        00000000 002ffc 000010 01  MS  0   0  1
  [22] .note.gnu.gold-ve NOTE            00000000 00300c 00001c 00      0   0  4
 ....

 As you can see the offset of .bss is changed now (it is equal now to
the offset of got.plt+size of gol.plt).
Is it criminal? I don't see anything wrong with gold inserting a
padding between .got.plt and .bss, why strip do not honor it?

 I believe that it can cause troubles later on for me when I start to
debug the application.
The fact that I linked with gold could be accidental, however when I
do the same with bfd the debuging is OK for me (but the addresses of
the sections are the same there).

thanks,
Alexander

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2013-12-12 13:54 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-29 11:57 [gold, strip] Question about the changed offset when stripping Alexander Ivchenko
2013-11-29 18:55 ` Alan Modra
2013-12-02 22:10   ` Cary Coutant
2013-12-03 10:10     ` Alan Modra
2013-12-03 10:30       ` Alexander Ivchenko
2013-12-03 11:23         ` Alan Modra
2013-12-03 11:40           ` Alexander Ivchenko
2013-12-09 12:33             ` Alexander Ivchenko
2013-12-09 12:45               ` Alexander Ivchenko
2013-12-09 16:04                 ` H.J. Lu
2013-12-09 17:43                   ` Cary Coutant
2013-12-09 18:22                     ` H.J. Lu
2013-12-09 18:58                       ` Cary Coutant
2013-12-09 19:09                         ` H.J. Lu
2013-12-10 13:10                           ` Alexander Ivchenko
2013-12-10 13:34                             ` H.J. Lu
2013-12-11 11:17                               ` Alexander Ivchenko
2013-12-09 15:58               ` Ian Lance Taylor
2013-12-11 21:29                 ` H.J. Lu
2013-12-11 22:04                   ` Cary Coutant
2013-12-11 22:29                     ` H.J. Lu
2013-12-12 13:54                       ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).