parent
ce6392611b
commit
1af701ec6a
|
|
@ -259,7 +259,7 @@ public:
|
||||||
RelocationTable<ELFT> *getDynamicRelocationTable() {
|
RelocationTable<ELFT> *getDynamicRelocationTable() {
|
||||||
if (!_dynamicRelocationTable) {
|
if (!_dynamicRelocationTable) {
|
||||||
_dynamicRelocationTable.reset(new (_allocator) RelocationTable<ELFT>(
|
_dynamicRelocationTable.reset(new (_allocator) RelocationTable<ELFT>(
|
||||||
_targetInfo, ".rela.dyn", ORDER_REL));
|
_targetInfo, ".rela.dyn", ORDER_DYNAMIC_RELOCS));
|
||||||
addSection(_dynamicRelocationTable.get());
|
addSection(_dynamicRelocationTable.get());
|
||||||
}
|
}
|
||||||
return _dynamicRelocationTable.get();
|
return _dynamicRelocationTable.get();
|
||||||
|
|
@ -269,7 +269,7 @@ public:
|
||||||
RelocationTable<ELFT> *getPLTRelocationTable() {
|
RelocationTable<ELFT> *getPLTRelocationTable() {
|
||||||
if (!_pltRelocationTable) {
|
if (!_pltRelocationTable) {
|
||||||
_pltRelocationTable.reset(new (_allocator) RelocationTable<ELFT>(
|
_pltRelocationTable.reset(new (_allocator) RelocationTable<ELFT>(
|
||||||
_targetInfo, ".rela.plt", ORDER_REL));
|
_targetInfo, ".rela.plt", ORDER_DYNAMIC_PLT_RELOCS));
|
||||||
addSection(_pltRelocationTable.get());
|
addSection(_pltRelocationTable.get());
|
||||||
}
|
}
|
||||||
return _pltRelocationTable.get();
|
return _pltRelocationTable.get();
|
||||||
|
|
@ -386,6 +386,8 @@ Layout::SegmentType DefaultLayout<ELFT>::getSegmentType(
|
||||||
case ORDER_HASH:
|
case ORDER_HASH:
|
||||||
case ORDER_DYNAMIC_SYMBOLS:
|
case ORDER_DYNAMIC_SYMBOLS:
|
||||||
case ORDER_DYNAMIC_STRINGS:
|
case ORDER_DYNAMIC_STRINGS:
|
||||||
|
case ORDER_DYNAMIC_RELOCS:
|
||||||
|
case ORDER_DYNAMIC_PLT_RELOCS:
|
||||||
case ORDER_REL:
|
case ORDER_REL:
|
||||||
case ORDER_INIT:
|
case ORDER_INIT:
|
||||||
case ORDER_PLT:
|
case ORDER_PLT:
|
||||||
|
|
@ -429,6 +431,8 @@ bool DefaultLayout<ELFT>::hasOutputSegment(Section<ELFT> *section) {
|
||||||
case ORDER_HASH:
|
case ORDER_HASH:
|
||||||
case ORDER_DYNAMIC_SYMBOLS:
|
case ORDER_DYNAMIC_SYMBOLS:
|
||||||
case ORDER_DYNAMIC_STRINGS:
|
case ORDER_DYNAMIC_STRINGS:
|
||||||
|
case ORDER_DYNAMIC_RELOCS:
|
||||||
|
case ORDER_DYNAMIC_PLT_RELOCS:
|
||||||
case ORDER_REL:
|
case ORDER_REL:
|
||||||
case ORDER_INIT:
|
case ORDER_INIT:
|
||||||
case ORDER_PLT:
|
case ORDER_PLT:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
extern int shankar;
|
||||||
|
static int a;
|
||||||
|
static int b;
|
||||||
|
int c;
|
||||||
|
int fn2() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int fn1() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int fn() {
|
||||||
|
a = 10;
|
||||||
|
b = 20;
|
||||||
|
c = 10;
|
||||||
|
shankar = 20;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int fn3() {
|
||||||
|
fn();
|
||||||
|
fn1();
|
||||||
|
fn2();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,9 @@
|
||||||
|
RUN: lld -core -target hexagon %p/Inputs/dynobj.o \
|
||||||
|
RUN: -output=%t -noinhibit-exec -output-type=shared
|
||||||
|
RUN: llvm-objdump -section-headers %t | FileCheck %s
|
||||||
|
|
||||||
|
CHECK: .dynsym
|
||||||
|
CHECK-NEXT: .dynstr
|
||||||
|
CHECK-NEXT: .rela.dyn
|
||||||
|
CHECK-NEXT: .rela.plt
|
||||||
|
CHECK-NEXT: .plt
|
||||||
Loading…
Reference in New Issue