PATCH: PR bfd/14207: linker can produce a NULL GNU_RELRO segment

H.J. Lu hjl.tools@gmail.com
Sun Jun 10 20:33:00 GMT 2012


On Sun, Jun 10, 2012 at 10:55 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> Hi,
>
> GNU_RELRO segment may not be generated since on-disk portion of
> PT_LOAD segment may not be aligned to common page size.  This patch add
> a dummy .relro section to make sure that on-disk portion of PT_LOAD
> segment is aligned to common page size.  OK to install?
>
> Thanks.
>
>
> H.J.
> ----
> bfd/
>
> 2012-06-10  H.J. Lu  <hongjiu.lu@intel.com>
>
>        PR bfd/14207
>        * elf-bfd.h (elf_link_hash_table): Add srelro.
>
>        * elf.c (assign_file_positions_for_non_load_sections): Abort
>        if PT_GNU_RELRO segment is invalid.
>
>        * elflink.c (elf_link_add_object_symbols): Create .relro section
>        for -z relro.
>

This patch fails to take the first few bytes of .got.plt section into
accounts.


-- 
H.J.



More information about the Binutils mailing list