I was analyzing an ELF Executable with readelf and getting the following Program and header.
|Type | Offset | VirtAddr | PhysAddr | FileSiz | MemSiz | Flg | Align | size | start addr | end addr |
|PHDR | 0x000034 | 0x08048034 | 0x08048034 | 0x00120 | 0x00120 | R E | 0x4 | 288 | 52 | 340 |
|INTERP | 0x000154 | 0x08048154 | 0x08048154 | 0x00013 | 0x00013 | R | 0x1 | 19 | 340 | 359 |
|LOAD | 0x000000 | 0x08048000 | 0x08048000 | 0x00600 | 0x00600 | RE | 0x1000 | 1536 | 0 | 1536 |
|LOAD | 0x000f0c | 0x08049f0c | 0x08049f0c | 0x0010c | 0x00114 | RW | 0x1000 | 276 | 3852 | 4128 |
|DYNAMIC | 0x000f14 | 0x08049f14 | 0x08049f14 | 0x000e8 | 0x000e8 | RW | 0x4 | 232 | 3860 | 4092 |
|NOTE | 0x000168 | 0x08048168 | 0x08048168 | 0x00044 | 0x00044 | R | 0x4 | 68 | 360 | 428 |
|GNU_EH_FRAME | 0x0004c4 | 0x080484c4 | 0x080484c4 | 0x0003c | 0x0003c | R | 0x4 | 60 | 1220 | 1280 |
|GNU_STACK | 0x000000 | 0x00000000 | 0x00000000 | 0x00000 | 0x00000 | RW | 0x10 | | | |
|GNU_RELRO | 0x000f0c | 0x08049f0c | 0x08049f0c | 0x000f4 | 0x000f4 | R | 0x1 | 244 | 3852 | 4096 |
1). Why is GNU_STACK at Program header table doesn't have a size or start addr?
2). At layout why memory position from 1536 to 3852 (2316 bytes) have no information? What this space is used for?
3). What changes to this format are needed to add extra text section?