// main.c
#include <stdio.h>
int main() {
puts("hello\n");
printf("hello\n");
return 0;
}
lld output of the .plt section
from llvm-readobj --sections main
lld output compiled with clang main.c -fuse-ld=lld -o main
Section {
Index: 17
Name: .plt (161)
Type: SHT_PROGBITS (0x1)
Flags [ (0x6)
SHF_ALLOC (0x2)
SHF_EXECINSTR (0x4)
]
Address: 0x17E0
Offset: 0x7E0
Size: 64
Link: 0
Info: 0
AddressAlignment: 16
EntrySize: 0
}
bfd output compiled with clang main.c -fuse-ld=bfd -o main
Section {
Index: 10
Name: .plt (104)
Type: SHT_PROGBITS (0x1)
Flags [ (0x6)
SHF_ALLOC (0x2)
SHF_EXECINSTR (0x4)
]
Address: 0x1020
Offset: 0x1020
Size: 48
Link: 0
Info: 0
AddressAlignment: 16
EntrySize: 16
}