This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

On Mon, 26 Dec 2016, Alan Modra wrote:

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

One of these changes appears to have broken building glibc for MIPS64 (n32 
ABI; others untested) with binutils master (not tested 2.28).  Building 
with glibc's, using mainline GCC and binutils, I see:

collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
../Rules:192: recipe for target '/scratch/jmyers/glibc-bot/build/compilers/mips64-linux-gnu/glibc/mips64-linux-gnu-n32/iconv/iconvconfig' failed
make[3]: *** [/scratch/jmyers/glibc-bot/build/compilers/mips64-linux-gnu/glibc/mips64-linux-gnu-n32/iconv/iconvconfig] Error 1

This was working with binutils 4e008fde3ab059a011ec487686b7f3e5324c0a44:

and broken as of 5474d94f03aedba2f832006dc7d680cc15792a7b:

Joseph S. Myers

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]