Read-only data in ELF libraries may be remapped writable at runtime (upcoming NDSS'17 paper)

Alan Modra amodra@gmail.com
Mon Dec 26 08:29:00 GMT 2016


On Sat, Dec 24, 2016 at 03:28:02PM +0100, Mathias Payer wrote:
> When linking the main executable, the linker would have to check the
> section information of the library and then infer the permissions of
> that section to carry those over. Instead of copying the str into the
> BSS section at runtime, the str would have to be allocated in a ro section.

Exactly.  You might like to try git master or binutils-2_28-branch,
which should be fixed for aarch64, arm, hppa, i386, metag,
microblaze, mips, mips64, nios2, or1k, ppc, ppc64, s390, s390x, sparc,
sparc64, tic6x, tilegx, tilepro and x86-64.

Note that the fix is only effective when linking with -z relro.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list