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: [PATCH] PR ld/16322: ld fails to generate GNU_RELRO segment


> 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


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