gc icon indicating copy to clipboard operation
gc copied to clipboard

DATA and BSS sections with DYLD linker

Open ysbaddaden opened this issue 3 years ago • 0 comments

The current solution to determine the DATA and BSS sections (initialized & uninitialized global variables) is invalid for Darwin dynamic linker (DYLD). We assume a memory layout that is a de-facto standard on UNIX (the TEXT section is immediately followed by the DATA section then the BSS section) that is unsupported with DYLD as explained in the get_end(3) manpage. We should instead use the dyld(3) functions to retrieve the actual regions for the DATA and BSS sections.

ysbaddaden avatar May 31 '22 12:05 ysbaddaden