winter.txt

Robert Connolly cendres at videotron.ca
Wed Feb 4 06:47:07 PST 2004


Untill my specs file is fixed, work with these:

CFLAGS="-pie -fpie -fstack-protector-all"
CXXFLAGS="-pie -fpie -fstack-protector-all"
LDFLAGS="-z relro -z combreloc -z noexecstack -pie"

Follow the cross-compile or optimizations hints to use these. This is the 
output from patch-2.5.4/patch and what everything should look like.

# readelf -l patch

Elf file type is DYN (Shared object file)
Entry point 0x2390
There are 10 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x00000034 0x00000034 0x00140 0x00140 R E 0x4
  INTERP         0x000174 0x00000174 0x00000174 0x00013 0x00013 R   0x1
      [Requesting program interpreter: /lib/ld-linux.so.2]
  LOAD           0x000000 0x00000000 0x00000000 0x19ff8 0x19ff8 R E 0x1000
  LOAD           0x01aa78 0x0001aa78 0x0001aa78 0x00720 0x02b54 RW  0x1000
  DYNAMIC        0x01ae58 0x0001ae58 0x0001ae58 0x000c8 0x000c8 RW  0x4
  NOTE           0x000188 0x00000188 0x00000188 0x00020 0x00020 R   0x4
  GNU_EH_FRAME   0x019f80 0x00019f80 0x00019f80 0x0001c 0x0001c R   0x4
  STACK          0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4
  PAX_FLAGS      0x000000 0x00000000 0x00000000 0x00000 0x00000     0x4
  GNU_RELRO      0x01aa78 0x0001aa78 0x0001aa78 0x00588 0x00588 R   0x1

 Section to Segment mapping:
  Segment Sections...
   00
   01     .interp
   02     .interp .note.ABI-tag .hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame
   03     .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt .data .bss
   04     .dynamic
   05     .note.ABI-tag
   06     .eh_frame_hdr
   07
   08
   09     .ctors .dtors .jcr .data.rel.ro .dynamic .got

Notice DYN (Shared object file), STACK, PAX_FLAGS, and GNU_RELRO(readonly). 
>From this command there should be no output.
# readelf -d patch | grep TEXT

I'll update the hint with this.




More information about the hlfs-dev mailing list