Opened 8 years ago

Closed 6 years ago

Last modified 5 years 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:
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
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 (6)

comment:1 by korli, 8 years ago

Duplicate #12451

comment:2 by waddlesplash, 8 years ago

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 by korli, 8 years ago

I think they were reverted.

comment:4 by korli, 8 years ago

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 by waddlesplash, 6 years ago

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.

comment:6 by nielx, 5 years ago

Milestone: Unscheduled

Remove milestone for tickets with status = closed and resolution != fixed

Note: See TracTickets for help on using tickets.