diff options
| author | Peter Smith <peter.smith@arm.com> | 2020-04-13 08:55:07 +0100 |
|---|---|---|
| committer | Peter Smith <peter.smith@arm.com> | 2020-04-14 10:13:21 +0100 |
| commit | 31c8e118961913341e4f5c066bbdcf9b3d2109c7 (patch) | |
| tree | 543d237bde8e5789fcc1ccffa14d38a419f1286b /lldb/packages/Python/lldbsuite/test/lldbinline.py | |
| parent | e0dbd025131c4d77d8a5050a91d391d950529a8c (diff) | |
| download | llvm-31c8e118961913341e4f5c066bbdcf9b3d2109c7.zip llvm-31c8e118961913341e4f5c066bbdcf9b3d2109c7.tar.gz llvm-31c8e118961913341e4f5c066bbdcf9b3d2109c7.tar.bz2 | |
[MC][ARM] Emit R_ARM_BASE_PREL for _GLOBAL_OFFSET_TABLE_ expressions
The _GLOBAL_OFFSET_TABLE_ in SysVr4 ELF is conventionally the base of the
.got or .got.prel sections. Expressions such as _GLOBAL_OFFSET_TABLE_
- (.L1 +8) are used in assembler code to calculate offsets into the .got.
At present MC outputs a R_ARM_REL32 with respect to the
_GLOBAL_OFFSET_TABLE_ symbol, whereas gas outputs a R_ARM_BASE_PREL
relocation with respect to the _GLOBAL_OFFSET_TABLE_ symbol. While both are
correct the R_ARM_REL32 depends on the value of the _GLOBAL_OFFSET_TABLE_
symbol, wheras te R_ARM_BASE_PREL relocation is idependent of the symbol.
The R_ARM_BASE_PREL is therefore slightly more robust to linker's that may
not follow the conventional placement of _GLOBAL_OFFSET_TABLE_; for example
LLD for some time defined _GLOBAL_OFFSET_TABLE_ to 0.
Differential Revision: https://reviews.llvm.org/D46319
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbinline.py')
0 files changed, 0 insertions, 0 deletions
