Since the first section is expected to be null, the function fails. Here, the
last section is the null one.
I tried not to use append but I failed to define an auxiliary, private, recursive helper function that builds the reversed list. Defining a recursive function inside another function doesn't seem to work and defining a recursive helper function above seems to require the helper function to be public. Let me know if there's a better way to do this.
Once again, there's some noise due to trailing whitespace.
I believe the order of ELF sections in
elf_memory_image_of_elf64_file
is reversed. Here is areadelf
dump of the object file:And here is what
elf_memory_image_of_elf64_file
gets (i
is the index of the section, its name is at the end of the line):Since the first section is expected to be null, the function fails. Here, the last section is the null one.
I tried not to use
append
but I failed to define an auxiliary, private, recursive helper function that builds the reversed list. Defining a recursive function inside another function doesn't seem to work and defining a recursive helper function above seems to require the helper function to be public. Let me know if there's a better way to do this.Once again, there's some noise due to trailing whitespace.