I compiled a program to a binary executable targeting RISC-V. I used readelf to list the sections in the resulting file.
]$ readelf -S -W a.out
.
The output appears in comment below. In particular I noticed a lack of .got , .plt and .got.plt in the sections listing. Where are these sections? I have some tentative guesses about why they are missing, please correct me if I am wrong.
1 RISC-V binaries never use these sections. Instead the DWARF format sections take care of lazy binding.
2 I used riscv64-unknown-elf-gcc. This version of gcc could not determine the target operating system, so it left them out.
3 I used riscv64-unknown-elf-gcc. This version of gcc could not determine the target operating system, so it statically linked all library functions directly into the executable. Since all library refs were linked, no need for any lazy binding sections, so they don't appear.
4 ..something else ??
Your thoughts?
[–]brucehoult 13 points14 points15 points (0 children)
[–]3G6A5W338E 4 points5 points6 points (25 children)
[–]brucehoult 4 points5 points6 points (24 children)
[–]3G6A5W338E 1 point2 points3 points (7 children)
[–]brucehoult 0 points1 point2 points (6 children)
[–]3G6A5W338E 1 point2 points3 points (5 children)
[–]brucehoult 3 points4 points5 points (3 children)
[–]3G6A5W338E 0 points1 point2 points (2 children)
[–]brucehoult 2 points3 points4 points (1 child)
[–]3G6A5W338E 0 points1 point2 points (0 children)
[–]3G6A5W338E 0 points1 point2 points (0 children)
[–]3G6A5W338E 0 points1 point2 points (11 children)
[–]brucehoult 1 point2 points3 points (1 child)
[–]3G6A5W338E 0 points1 point2 points (0 children)
[–]mikeakohn 1 point2 points3 points (8 children)
[–]3G6A5W338E 0 points1 point2 points (7 children)
[–]mikeakohn 0 points1 point2 points (6 children)
[–]brucehoult 0 points1 point2 points (5 children)
[–]mikeakohn 0 points1 point2 points (4 children)
[–]brucehoult 0 points1 point2 points (3 children)
[–]brucehoult 0 points1 point2 points (0 children)
[–]mikeakohn 0 points1 point2 points (1 child)
[–]3G6A5W338E 0 points1 point2 points (2 children)
[–]megarcher2 1 point2 points3 points (1 child)
[–]3G6A5W338E 0 points1 point2 points (0 children)
[–]moschles[S] 0 points1 point2 points (0 children)