bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/18288] New: linker -s output suboptimal


From: dilyan.palauzov at aegee dot org
Subject: [Bug binutils/18288] New: linker -s output suboptimal
Date: Tue, 21 Apr 2015 12:37:20 +0000

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

            Bug ID: 18288
           Summary: linker -s output suboptimal
           Product: binutils
           Version: 2.25
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: dilyan.palauzov at aegee dot org

I have binutils 2.25/gold 1.11.  I compile a program with `ld.gold -s', do
`readelf --all` on in.  Then I `strip' the program and do `readelf --all' on
the results.  Then I compare the outputs of the two `readelf' invocations.  I
expected these to be identical.  However, they are not, here the diff:

--- r-gold-stripped    2015-04-21 12:00:29.206029031 +0000
+++ r-gold-orig    2015-04-21 12:00:22.532028940 +0000
@@ -10,7 +10,7 @@
   Version:                           0x1
   Entry point address:               0x40c084
   Start of program headers:          64 (bytes into file)
-  Start of section headers:          469920 (bytes into file)
+  Start of section headers:          469928 (bytes into file)
   Flags:                             0x0
   Size of this header:               64 (bytes)
   Size of program headers:           56 (bytes)

The sizes also differ:

471648 - stripped
471656 - unstripped

Then I did the same procedure with the ld.bfd - linker.  The numbers coincide
with ld.gold.

To my understanding the linker option -s is supposed to make running `strip'
after compiling superfluous.  But it doesn't, as strip reduces the file size
further, without doing anything else.

Hence I consider this as bug (in both ld and gold).

-- 
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]