Page MenuHomeFreeBSD

amd64 crt1: Explicitly use a PLT entry for main in the PIC case.
ClosedPublic

Authored by jhb on Jul 19 2023, 6:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 3:29 PM
Unknown Object (File)
Sep 27 2024, 4:28 AM
Unknown Object (File)
Sep 17 2024, 5:16 PM
Unknown Object (File)
Sep 17 2024, 12:09 PM
Unknown Object (File)
Sep 16 2024, 7:41 PM
Unknown Object (File)
Sep 16 2024, 12:51 PM
Unknown Object (File)
Sep 4 2024, 4:34 AM
Unknown Object (File)
Aug 30 2024, 12:50 PM
Subscribers

Details

Summary

This ensures GNU as generates a R_X86_64_PLT32 relocation instead of
R_X86_64_32.

Fixes: c969310c992a csu: Implement _start using as to satisfy unwinders on x86_64

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 52728
Build 49619: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Jul 19 2023, 6:31 PM

This fixes linking dynamic binaries again with GCC 12.

This revision is now accepted and ready to land.Jul 19 2023, 6:40 PM

Thank you!
I also had to add:

LDFLAGS+=       -Wl,-znoexecstack

to secure/lib/libcrypto/**/**/Makefile.

EDIT: https://github.com/freebsd/freebsd-src/pull/800

In D41101#935894, @jlduran_gmail.com wrote:

Thank you!
I also had to add:

LDFLAGS+=       -Wl,-znoexecstack

to secure/lib/libcrypto/**/**/Makefile.

EDIT: https://github.com/freebsd/freebsd-src/pull/800

I have a separate review for this: D41102