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

H.J. Lu hjl.tools@gmail.com
Mon Jun 11 17:26:00 GMT 2012


On Mon, Jun 11, 2012 at 7:15 AM, nick clifton <nickc@redhat.com> wrote:
> Hi H.J.
>
>
>> This patch add
>> a dummy .relro section to make sure that on-disk portion of PT_LOAD
>> segment is aligned to common page size.
>
>

The real bug is in _bfd_elf_map_sections_to_segments.  It
failed to properly compute file size for PT_GNU_RELRO segment.
Here is an updated patch.  It removes PT_GNU_RELRO segment
if doesn't fit.  OK to install?

Thanks.

-- 
H.J.
--
bfd/

2012-06-11  H.J. Lu  <hongjiu.lu@intel.com>

	PR bfd/14207
	* elf.c (_bfd_elf_map_sections_to_segments): Properly compute
	file size for PT_GNU_RELRO segment.
	(assign_file_positions_for_non_load_sections): Abort if
	PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.

ld/testsuite/

2012-06-11  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/14207
	* ld-x86-64/x86-64.exp: Run pr14207.

	* ld-x86-64/pr14207.d: New file.
	* ld-x86-64/pr14207.s: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-pr14207-2.patch
Type: application/octet-stream
Size: 3207 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20120611/b8b184af/attachment.obj>


More information about the Binutils mailing list