What exactly are you trying to suppress here?
Consider this example:
% cat empty.c
int main() {
return 0;
}
% clang -c empty.c
% ld empty.o -o empty -map map.txt
% otool -t -v empty
empty:
(__TEXT,__text) section
_main:
0000000100003f94 sub sp, sp, #0x10
0000000100003f98 mov w0, #0x0
0000000100003f9c str wzr, [sp, #0xc]
0000000100003fa0 add sp, sp, #0x10
0000000100003fa4 ret
% cat map.txt
# Path: empty
# Arch: arm64
# Object files:
[ 0] linker synthesized
[ 1] /Users/quinn/Test/empty.o
# Sections:
# Address Size Segment Section
0x100003F94 0x00000014 __TEXT __text
0x100003FA8 0x00000058 __TEXT __unwind_info
# Symbols:
# Address Size File Name
0x100003F94 0x00000014 [ 1] _main
Note This is Xcode 15.4 on macOS 14.5.
The linker hasn’t insert any extra code here. The only thing present is the main
function generated by the Clang compiler. And you have to have that because, when building an executable, LC_MAIN
has to point somewhere.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"