Skip to content
Commit 7c18abf9 authored by Rui Ueyama's avatar Rui Ueyama
Browse files

Set DF_TEXTREL to executables that need text relocations.

Summary:
If an executable needs text relocations, it should be marked as such so
that the loader can prepare for text relocations. We currently create a
dummy segment with DT_TEXTREL for that purpose.

Generic ABI as of 2000 [1] mentioned that "Its [DT_TEXTREL's] use
has been superseded by the DF_TEXTREL flag". However, it's actually not
superseded even after 18 years. OpenBSD and musl recognize only DT_TEXTREL.
So we still need to set both.

[1] http://www.sco.com/developers/gabi/2000-07-17/ch5.dynamic.html

Reviewers: rafael

Subscribers: emaste, llvm-commits, arichardson

Differential Revision: https://reviews.llvm.org/D43920

llvm-svn: 326503
parent 7373ae5c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment