[Object] Add DF_1_PIE

This flag (and the whole field DT_FLAGS_1) originated from Solaris. I intend to use it in an LLD patch D80872.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D80871
This commit is contained in:
Fangrui Song 2020-06-01 08:50:21 -07:00
parent b874dc4dda
commit d9943e7f0c
3 changed files with 8 additions and 6 deletions

View File

@ -1296,7 +1296,8 @@ enum {
DF_1_NORELOC = 0x00400000,
DF_1_SYMINTPOSE = 0x00800000, // Object has individual interposers.
DF_1_GLOBAUDIT = 0x01000000, // Global auditing required.
DF_1_SINGLETON = 0x02000000 // Singleton symbols are used.
DF_1_SINGLETON = 0x02000000, // Singleton symbols are used.
DF_1_PIE = 0x08000000, // Object is a position-independent executable.
};
// DT_MIPS_FLAGS values.

View File

@ -59,7 +59,7 @@
# LLVM64-NEXT: 0x000000006FFFFEF7 TLSDESC_GOT 0x1000
# LLVM64-NEXT: 0x000000006FFFFFF9 RELACOUNT 0
# LLVM64-NEXT: 0x000000006FFFFFFA RELCOUNT 0
# LLVM64-NEXT: 0x000000006FFFFFFB FLAGS_1 NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON {{$}}
# LLVM64-NEXT: 0x000000006FFFFFFB FLAGS_1 NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON PIE {{$}}
# LLVM64-NEXT: 0x000000006FFFFFF0 VERSYM 0x1000
# LLVM64-NEXT: 0x000000006FFFFFFC VERDEF 0x1000
# LLVM64-NEXT: 0x000000006FFFFFFD VERDEFNUM 0
@ -124,7 +124,7 @@
# GNU64-NEXT: 0x000000006ffffef7 (TLSDESC_GOT) 0x1000
# GNU64-NEXT: 0x000000006ffffff9 (RELACOUNT) 0
# GNU64-NEXT: 0x000000006ffffffa (RELCOUNT) 0
# GNU64-NEXT: 0x000000006ffffffb (FLAGS_1) NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON {{$}}
# GNU64-NEXT: 0x000000006ffffffb (FLAGS_1) NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON PIE {{$}}
# GNU64-NEXT: 0x000000006ffffff0 (VERSYM) 0x1000
# GNU64-NEXT: 0x000000006ffffffc (VERDEF) 0x1000
# GNU64-NEXT: 0x000000006ffffffd (VERDEFNUM) 0
@ -349,7 +349,7 @@ ProgramHeaders:
# LLVM32-NEXT: 0x6FFFFEF7 TLSDESC_GOT 0x1000
# LLVM32-NEXT: 0x6FFFFFF9 RELACOUNT 0
# LLVM32-NEXT: 0x6FFFFFFA RELCOUNT 0
# LLVM32-NEXT: 0x6FFFFFFB FLAGS_1 NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON {{$}}
# LLVM32-NEXT: 0x6FFFFFFB FLAGS_1 NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON PIE {{$}}
# LLVM32-NEXT: 0x6FFFFFF0 VERSYM 0x1000
# LLVM32-NEXT: 0x6FFFFFFC VERDEF 0x1000
# LLVM32-NEXT: 0x6FFFFFFD VERDEFNUM 0
@ -414,7 +414,7 @@ ProgramHeaders:
# GNU32-NEXT: 0x6ffffef7 (TLSDESC_GOT) 0x1000
# GNU32-NEXT: 0x6ffffff9 (RELACOUNT) 0
# GNU32-NEXT: 0x6ffffffa (RELCOUNT) 0
# GNU32-NEXT: 0x6ffffffb (FLAGS_1) NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON {{$}}
# GNU32-NEXT: 0x6ffffffb (FLAGS_1) NOW GLOBAL GROUP NODELETE LOADFLTR INITFIRST NOOPEN ORIGIN DIRECT TRANS INTERPOSE NODEFLIB NODUMP CONFALT ENDFILTEE DISPRELDNE DISPRELPND NODIRECT IGNMULDEF NOKSYMS NOHDR EDITED NORELOC SYMINTPOSE GLOBAUDIT SINGLETON PIE {{$}}
# GNU32-NEXT: 0x6ffffff0 (VERSYM) 0x1000
# GNU32-NEXT: 0x6ffffffc (VERDEF) 0x1000
# GNU32-NEXT: 0x6ffffffd (VERDEFNUM) 0

View File

@ -2350,7 +2350,8 @@ static const EnumEntry<unsigned> ElfDynamicDTFlags1[] = {
LLVM_READOBJ_DT_FLAG_ENT(DF_1, NORELOC),
LLVM_READOBJ_DT_FLAG_ENT(DF_1, SYMINTPOSE),
LLVM_READOBJ_DT_FLAG_ENT(DF_1, GLOBAUDIT),
LLVM_READOBJ_DT_FLAG_ENT(DF_1, SINGLETON)
LLVM_READOBJ_DT_FLAG_ENT(DF_1, SINGLETON),
LLVM_READOBJ_DT_FLAG_ENT(DF_1, PIE),
};
static const EnumEntry<unsigned> ElfDynamicDTMipsFlags[] = {