Comments (5)
Are there figures on how many regular relative relocations are transformed into R_AARCH64_AUTH_RELATIVE under PAuthABI?
The 32b limit was chosen on the basis that in the vast majority of cases (small code model, position independent code) the addend is going to be within the 0..2^32 range. So I would say that in a typical userspace, pretty much every relocation is going to use this.
from abi-aa.
I agree that in the majority of cases linkers don't need to move a relocation from .relr.auth.dyn
to .rela.dyn
.
The question is do we need this RELR variant?
If we use CREL (while size(.crel.dyn)/size(.relr.dyn)
may be 3.5x, size(.crel.dyn)/size(.o)
is just 0.3%), supporting AUTH relative will take very few lines in https://github.com/MaskRay/llvm-project/blob/demo-crel/lld/ELF/SyntheticSections.cpp around CrelSection<uint>::updateAllocSize
, and the code will be centralized in one place.
from abi-aa.
Got it, I misread your earlier message and thought you were asking about .rela.dyn
-> .relr.auth.dyn
rather than R_AARCH64_ABS64
-> R_AARCH64_AUTH_ABS64
. Let me see if I can collect those numbers for AOSP.
from abi-aa.
I built AOSP with PAuth ABI disabled and enabled for the Cuttlefish (i.e. emulator) arm64 target and ran the following commands from the symbols
directory of the build directory, which contains unstripped versions of all built binaries shipped on the device.
$ llvm-readelf -rW (find -type f) | grep 000000000000e20| wc -l
524144
$ llvm-readelf -rW (find -type f) | grep R_AARCH64_RELATIVE| wc -l
725136
So around 40% of R_AARCH64_RELATIVE
relocations become R_AARCH64_AUTH_RELATIVE
.
Also, the total size of all SHT_RELR
sections in a tree of binaries built with PAuth ABI disabled is 460824 bytes and with PAuth ABI enabled is 307032 bytes. So we can estimate that the total DT_AARCH64_AUTH_RELR
size if it were implemented would be around 150KB. Assuming a 3.5x ratio for CREL vs RELR that would mean it would cost 375KB in the shipped image not to have DT_AARCH64_AUTH_RELR
(i.e. 0.04% of the total image size of 1.1GB), but I would expect the actual ratio to be higher than for DT_RELR
since each relocation contains more information.
from abi-aa.
Related Issues (20)
- [sysvabi64] document requirement for bti c in more detail HOT 1
- [aaelf64] BTI PLT requirement should be weaker HOT 2
- Is page-size part of the ABI ? HOT 1
- [sysvabi64] Optional `add x16, x16, :lo12: &.got.plt[N]]` for `ld -z now` HOT 5
- Clarify definition of HFA in AAPCS64 HOT 8
- RST code blocks of type "none" cause warnings when generating html
- Word wrap in RST source files is inconsistent
- PAuthABI support for DWARF (Debugging and Unwinding)
- Reserve DT_ tags used in the PAuthABI and MemtagABI.
- static linkers (lld and GNU ld) out of sync with aaelf64 for GOT relocations with addends. HOT 1
- Need dynamic tag to reflect .note.gnu.prop and/or .note.AARCH64-PAUTH-ABI-tag section addresses HOT 3
- Define GOT-Relative data relocation HOT 3
- Undefined weak symbol's address HOT 8
- Missing page "Semihosting for AArch32 and AArch64" HOT 4
- [pauthabielf64] Define `NT_ARM_TYPE_PAUTH_ABI_TAG` constant
- Some documents have stopped rendering in the preview mode in the Github UI HOT 3
- aaelf64/aaelf64.rst can't preview HOT 2
- Clarify use of DWARF versions
- [PAUTHABIELF64] Possible typo in `R_AARCH64_AUTH_GOT_LO12_NC` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abi-aa.