p->p_align = 1 << bed->s->log_file_align;
if (m == phdr_load_seg)
- {
- if (!m->includes_filehdr)
- p->p_offset = off;
- off += actual * bed->s->sizeof_phdr;
- }
+ off += actual * bed->s->sizeof_phdr;
no_contents = false;
off_adjust = 0;
{
if (p->p_type == PT_LOAD)
{
+ p->p_offset = off - actual * bed->s->sizeof_phdr;
elf_elfheader (abfd)->e_phoff = p->p_offset;
if (m->count > 0)
{
}
else if (phdr_load_seg != NULL)
{
+ /* Also set PT_PHDR to match phdr_load_seg. We've
+ sorted segments so that phdr_load_seg will
+ already be set by the code immediately above. */
Elf_Internal_Phdr *phdr = phdrs + phdr_load_seg->idx;
bfd_vma phdr_off = 0; /* Octets. */
if (phdr_load_seg->includes_filehdr)
.* \.tbss +NOBITS +0+130 [0-9a-f]+ 0+30 00 WAT .*
.* \.map +PROGBITS +0+130 [0-9a-f]+ 0+c 00 +A .*
#...
- +PHDR +(0x0+40 0x0+40 0x0+40 0x0+a8 0x0+a8|0x0+34 0x0+34 0x0+34 0x0+60 0x0+60|0x0+34 0x0+a0 0x0+a0 0x0+60 0x0+60) R .*
- +LOAD +(0x0+40 0x0+40 0x0+40 0x0+fc 0x0+fc|0x0+34 0x0+34 0x0+34 0x0+1(08|10) 0x0+1(08|10)|0x0+34 0x0+a0 0x0+a0 0x0+9c 0x0+9c) R E .*
+ +PHDR +(0x0+58 0x0+58 0x0+58 0x0+a8 0x0+a8|0x0+(a0|34) 0x0+a0 0x0+a0 0x0+60 0x0+60) R .*
+ +LOAD +(0x0+58 0x0+58 0x0+58 0x0+e4 0x0+e4|0x0+(a0|34) 0x0+a0 0x0+a0 0x0+(9c|a0) 0x0+(9c|a0)) R E .*
+TLS +0x0+(110|a4) 0x0+110 0x0+110 0x0+20 0x0+50 R .*
#...
.* \.text \.tdata \.map