>> 021c4000-021e5000 rw-p 00000000 00:00 0
> Just to avoid misunderstandings: 'rw-p' lacks 'x', and that's what I
> am looking for. On disk, I'm looking for the GNU_HEAP *with* a 0 size
> and no 'X':
>
> readelf -l demo.exe | grep -i "GNU_HEAP"
>
> Type Offset VirtAddr PhysAddr FileSize MemSize Flg Align
> GNU_HEAP 0x000000 0x00000000 0x00000000 0x000000 0x000000 RW 0x04
On Fedora 17 the default build procedures do not generate such a[ PT_]GNU_HEAP.
In fact, there is no such symbol in /usr/include/elf.h:
-----
$ rpm -qf /usr/include/elf.h
glibc-headers-2.15-51.fc17.x86_64
$ grep HEAP /usr/include/elf.h
$ ### *empty* result
$ readelf --segments ./hello
Elf file type is EXEC (Executable file)
Entry point 0x4003d0
There are 8 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
PHDR 0x0000000000000040 0x0000000000400040 0x0000000000400040
0x00000000000001c0 0x00000000000001c0 R E 8
INTERP 0x0000000000000200 0x0000000000400200 0x0000000000400200
0x000000000000001c 0x000000000000001c R 1
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000
0x000000000000a2e4 0x000000000000a2e4 R E 200000
LOAD 0x000000000000a2e8 0x000000000060a2e8 0x000000000060a2e8
0x000000000000021c 0x0000000000000220 RW 200000
DYNAMIC 0x000000000000a300 0x000000000060a300 0x000000000060a300
0x00000000000001d0 0x00000000000001d0 RW 8
NOTE 0x000000000000021c 0x000000000040021c 0x000000000040021c
0x0000000000000044 0x0000000000000044 R 4
GNU_EH_FRAME 0x000000000000a210 0x000000000040a210 0x000000000040a210
0x000000000000002c 0x000000000000002c R 4
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 8
Section to Segment mapping:
Segment Sections...
00
01 .interp
02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame
03 .init_array .fini_array .jcr .dynamic .got .got.plt .data .bss
04 .dynamic
05 .note.ABI-tag .note.gnu.build-id
06 .eh_frame_hdr
07
-----
>
> I'm not sure why verification includes a 0-size into the requirement,
What is this "verification" of which you speak?
> but I think it has to do with consistency: previous handling of
> stacks, GCC nested functions, and trampolines.
>
> Is there a system parameter I can read from /proc/sys/kernel/ to
> verify the platform configuration?
The .config is not compiled into the running kernel.
Instead, the default installation procedure puts a copy in /boot:
-----
$ cd /boot
$ ls -l config-3.5.0-2.fc17.x86_64 vmlinuz-3.5.0-2.fc17.x86_64
-rw-r--r--. 1 root root 118625 Jul 30 08:05 config-3.5.0-2.fc17.x86_64
-rwxr-xr-x. 1 root root 4772672 Jul 30 08:05 vmlinuz-3.5.0-2.fc17.x86_64
-----
--