This is the mail archive of the binutils@sourceware.org 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: [SECURITY] Merged .text and .rodata in linker scripts


On Tue, May 13, 2014 at 9:14 AM, Stefan NÃrnberger
<nuernberger@cs.uni-saarland.de> wrote:
>
> My solution to this (see attached linker script) separates read-only
> data from executable data and puts them in separate sections (.rodata
> and .text). To overcome the issue that the ELF header is part of
> executable data, the .rodata section is the first section to be loaded,
> thereby making the ELF header part of .rodata, which means it is still
> accessible, e.g. for routines that iterate over PHDRs.

FYI gold uses the --rosegment option for a similar feature.  Ideally
GNU ld would be compatible.

Ian


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