When reserving copy relocation space for a shared symbol, scan the DSO's program headers to see if the symbol is in a read-only segment. If so, reserve space for that symbol in a new synthetic section named .bss.rel.ro which will be covered by the relro program header. This fixes the security issue disclosed on the binutils mailing list at: https://sourceware.org/ml/libc-alpha/2016-12/msg00914.html Differential Revision: https://reviews.llvm.org/D28272 llvm-svn: 291524
14 lines
142 B
ArmAsm
14 lines
142 B
ArmAsm
.rodata
|
|
.globl a
|
|
.size a, 4
|
|
.type a, @object
|
|
a:
|
|
.word 1
|
|
|
|
.section .data.rel.ro,"aw",%progbits
|
|
.globl b
|
|
.size b, 4
|
|
.type b, @object
|
|
b:
|
|
.word 2
|