This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] PR ld/16322: ld fails to generate GNU_RELRO segment
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: hjl dot tools at gmail dot com
- Cc: binutils at sourceware dot org, nickc at redhat dot com
- Date: Thu, 9 Jan 2014 17:05:31 +0100
- Subject: Re: [PATCH] PR ld/16322: ld fails to generate GNU_RELRO segment
- Authentication-results: sourceware.org; auth=none
> From: "H.J. Lu" <hjl.tools@gmail.com>
> Date: Wed, 8 Jan 2014 15:01:49 +0100
> >> 2013-12-12 H.J. Lu <hongjiu.lu@intel.com>
> >>
> >> PR ld/14207
> >> PR ld/16322
> >> PR binutils/16323
> >> * elf.c (_bfd_elf_map_sections_to_segments): Don't check section
> >> size for PT_GNU_RELRO segment.
> >> (assign_file_positions_for_load_sections): If PT_LOAD segment
> >> doesn't fit PT_GNU_RELRO segment, adjust its p_filesz and p_mems
> > Are there any objections to this patch?
Did you get explicit approval for this patch?
> I checked it in. Please let me know if there are any problems.
It fails for cris-axis-linux-gnu: no GNU_RELRO segment.
Should I worry or is this going to be covered by follow-up
changes? I see there's an ongoing conversation.
dump.out looks like:
Elf file type is DYN (Shared object file)
Entry point 0x160
There are 3 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x00000000 0x00000000 0x00160 0x00160 R 0x2000
LOAD 0x000160 0x00002160 0x00002160 0x00080 0x00080 RW 0x2000
DYNAMIC 0x000164 0x00002164 0x00002164 0x00070 0x00070 RW 0x4
Section to Segment mapping:
Segment Sections...
00 .hash .dynsym .dynstr .rela.dyn
01 .data.rel.ro .dynamic .got
02 .dynamic
brgds, H-P