freebsd-src/lib/csu
Andrew Turner 53120fbb68 csu: Find the main pointer through the GOT
Use the Global Offset Table to find the location of main in crt1. With
lld the old code would point to main@plt, however ld.bfd fails to link
when main is in a shared library.

Fix this by using the GOT address to find main as it works with both
lld and bfd.

Reviewed by:	jrtc27
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45259
2024-05-22 08:18:10 +00:00
..
aarch64 csu: Find the main pointer through the GOT 2024-05-22 08:18:10 +00:00
amd64 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
arm lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
common lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
i386 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
powerpc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
powerpc64 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
riscv dirdeps: Add missing dependency files 2023-10-29 17:08:29 -04:00
tests lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.inc csu: add crtbrand.o dependency on sys/param.h 2024-01-31 15:40:27 -05:00