Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Mar 2016 03:58:05 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 207631] rtld requires the first PT_LOAD segment to be .text and is incompatible with output produced by lld
Message-ID:  <bug-207631-8-4gvW9TVmKD@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-207631-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-207631-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207631

--- Comment #1 from Ed Maste <emaste@freebsd.org> ---
For reference here is the segment layout currently produced by lld:

% readelf -l bin/sh

Elf file type is EXEC (Executable file)
Entry point 0x19000
There are 10 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  PHDR           0x0000000000000040 0x0000000000010040 0x0000000000010040
                 0x0000000000000230 0x0000000000000230  R      8
  INTERP         0x0000000000000270 0x0000000000010270 0x0000000000010270
                 0x0000000000000015 0x0000000000000015  R      1
      [Requesting program interpreter: /libexec/ld-elf.so.1]
  LOAD           0x0000000000000000 0x0000000000010000 0x0000000000010000
                 0x000000000000875c 0x000000000000875c  R      1000
  LOAD           0x0000000000009000 0x0000000000019000 0x0000000000019000
                 0x000000000001b220 0x000000000001b220  R E    1000
  LOAD           0x0000000000025000 0x0000000000035000 0x0000000000035000
                 0x0000000000001500 0x0000000000003a50  RW     1000
  DYNAMIC        0x0000000000025028 0x0000000000035028 0x0000000000035028
                 0x0000000000000130 0x0000000000000130  RW     8
  GNU_RELRO      0x0000000000025000 0x0000000000035000 0x0000000000035000
                 0x0000000000000160 0x0000000000000160  R      1
  GNU_EH_FRAME   0x0000000000007f18 0x0000000000017f18 0x0000000000017f18
                 0x0000000000000844 0x0000000000000844  R      1
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RW     0
  NOTE           0x0000000000000288 0x0000000000010288 0x0000000000010288
                 0x0000000000000030 0x0000000000000030  R      4

 Section to Segment mapping:
  Segment Sections...
   00=20=20=20=20=20
   01     .interp=20
   02     .interp .note.tag .rodata .eh_frame .rodata .rodata .rodata .dyns=
ym
.gnu.hash .hash .dynstr .rela.dyn .rela.plt .eh_frame_hdr=20
   03     .text .init .fini .plt=20
   04     .ctors .dtors .jcr .dynamic .got .data .got.plt .bss=20
   05     .dynamic=20
   06     .ctors .dtors .jcr .dynamic .got=20
   07     .eh_frame_hdr=20
   08=20=20=20=20=20
   09     .note.tag

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-207631-8-4gvW9TVmKD>