bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/18201] Incorrect ELF generated when .text is below 0x200000


From: amodra at gmail dot com
Subject: [Bug ld/18201] Incorrect ELF generated when .text is below 0x200000
Date: Mon, 06 Apr 2015 08:46:52 +0000

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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |amodra at gmail dot com
         Resolution|---                         |INVALID

--- Comment #2 from Alan Modra <amodra at gmail dot com> ---
The resulting binary is not "incorrect ELF".  The fact that it won't run on
Linux is simply due to invalid user input.

Something like HJ's patch might be OK if
a) it did not affect generic ELF targets
b) the minpagesize test was removed
c) info->shared test was replaced with abfd->flags & DYNAMIC, and ld modified
to set output flags earlier, so that objcopy would make the same decisions as
ld when rewriting headers.

Point (a) is because not loading the file and program headers just because the
executable starts in the first page is only appropriate if the operating system
unmaps the first page.  However, implementing (a) is tricky, not least because
more than one Linux target is no different from the generic ELF target for that
architecture..

So I'm going to close the bug as invalid.  Starting an executable in the first
page is just one of many ways a user can break things with custom linker
scripts, or with -Ttext.

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