bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/21448] References to constant data in shared libraries bloats 2.


From: michael at talosis dot ca
Subject: [Bug ld/21448] References to constant data in shared libraries bloats 2.28 executables compared to 2.27
Date: Wed, 03 May 2017 02:00:31 +0000

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

--- Comment #3 from Michael Deutschmann <michael at talosis dot ca> ---
GCC (6.3.0) doesn't seem to be doing anything magical in the .s files.  It
looks like the behavior is triggered only by a ".size" directive on the shared
library side, and ".size" isn't documented to have any implications regarding
"copy relocs".  On the executable side, the behavior is triggered by the
simplest reference to the big object's address, even in an entirely handwritten
.s file.

Also, it would seem binutils could avoid the bloat by making the ".data.rel.ro"
section like BSS, as it seems to only include zeros.  This would mean adding
one more LOAD segment to an ELF executable (with zero filesize and substantial
memsize); therefore it would be a reasonable space-optimization to do it the
2.28 way if the .data.rel.ro has fewer bytes than one ELF p-header.

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