Opened 2 years ago

Closed 7 months ago

#13292 closed bug (no change required)

GCC5 (at least on x86_64) will not create position-independent executables

Reported by: waddlesplash Owned by: korli
Priority: normal Milestone: Unscheduled
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

I'm attempting to port the Dolphin emulator, whose JIT requires *no* position-independent code. It builds OK now, but despite -fno-pie getting passed to the linker, a position independent executable is still made:

$ readelf -h Binaries/dolphin-emu-qt2 | grep "Type: "
Type:      DYN (shared object file)  

Possibly relevant: #12430. This is hrev50951, with GCC "5.4.0 (2016_06_04)" and ld "2.26.1".

The source code to my WIP port is here: https://github.com/waddlesplash/dolphin/tree/haiku-2 (Dolphin requires x86_64, so don't even bother trying to build on 32-bit Haiku.)

Change History (5)

comment:1 Changed 2 years ago by korli

Duplicate #12451

comment:2 Changed 2 years ago by waddlesplash

Is it? That ticket seems to be about broken TLS support, which was broken by the change which should've allowed non-PIEs. Unless those changes got reverted and I missed that...

comment:3 Changed 2 years ago by korli

I think they were reverted.

comment:4 Changed 2 years ago by korli

Summary: GCC5 (at least on x86_64) will not create position-indepedent executeablesGCC5 (at least on x86_64) will not create position-independent executables

comment:5 Changed 7 months ago by waddlesplash

Resolution: no change required
Status: newclosed

OpenBSD at least is now going with all-PIE executables, so I don't think we need to "fix" this.

Note: See TracTickets for help on using tickets.