[llvm-bugs] [Bug 43997] [LLD/ELF] LLD change inflates elf binary size when linked with no-rosegment

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 19 13:05:56 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=43997

Fangrui Song <i at maskray.me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|REOPENED                    |RESOLVED

--- Comment #9 from Fangrui Song <i at maskray.me> ---
Posted a qemu patch last Friday
https://lists.nongnu.org/archive/html/qemu-devel/2019-11/msg02480.html

Some sections need to be placed first, e.g. .interp and some .note*. Core
dumpers give priority to first few pages. So the option may end up placing R
sections in both sides of RX. The code size inefficiency will also lower its
utility. R and RW on both sides of RX makes it less likely to cause relocation
overflows for large executables/shared objects.

Another point worth mentioning: -Ttext and -Ttext-segment are different in GNU
ld, but both lld and gold implement -Ttext and -Ttext-segment as aliases.

gold sets the segment address (GNU ld -Ttext-segment behavior) while lld sets
the .text address (GNU ld -Ttext behavior). We probably should remove
-Ttext-segment to avoid confusion, if we don't intend to support it (it is very
old-fashioned).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191119/91f451c0/attachment.html>


More information about the llvm-bugs mailing list