[ Filed earlier as dwz PR24249 - "Section offsets not monotonically increasing". ] When using the gold linker to generate the .gdb_index section: ... $ gcc hello.c -g -fuse-ld=gold -Wl,--gdb-index ... and inspecting the section offsets around .gdb_index: ... $ readelf -S a.out | grep '[[]' | egrep -C1 'Offset|\.gdb_index' [Nr] Name Type Address Offset [ 0] NULL 0000000000000000 00000000 -- [31] .debug_str PROGBITS 0000000000000000 00001b2f [32] .gdb_index PROGBITS 0000000000000000 000034b0 [33] .debug_ranges PROGBITS 0000000000000000 000021f0 ... we see that the offsets are not monotonically increasing. The property that the file offsets of the entries in the section header table are in a monotonically increasing order, is not a requirement of the ELF standard, but it is expected by a variety of other tools which process ELF binaries.