1

So, In the binary files of C program compiled using old gcc versions like 3.3.6 there is a section like .dtors but there is nothing like that in the binary files of C program compiled using new gcc versions like 11.3.0

I want to know what will be the last section to be executed in any gcc compiled code or the section which controls the exit of a program. I also what to know what is the purpose of .fini_array section.

Vignesh SB
  • 11
  • 4
  • 1
    Why is this tagged [tag:integer-overflow] and [tag:exploit]? – Nate Eldredge Mar 03 '23 at 01:33
  • it is tagged in integer-overflow and exploit because I am using an integer overflow to change the return address of an address and I am storing the SHELLCODE in an environment variable which I am using to call in the place of an exit function like .dtors but in Morden compilers I am not able to find one – Vignesh SB Mar 03 '23 at 03:37
  • https://github.com/lattera/glibc/blob/master/elf/soinit.c#L12 https://github.com/lattera/glibc/blob/895ef79e04a953cac1493863bcae29ad85657ee1/elf/dl-fini.c#L130 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770 https://maskray.me/blog/2021-11-07-init-ctors-init-array The last link is nice - write an answer upon it. – KamilCuk Mar 26 '23 at 09:56

0 Answers0