summaryrefslogtreecommitdiff
path: root/libc/malloc_debug/malloc_debug.cpp
diff options
context:
space:
mode:
authorRyan Prichard <rprichard@google.com>2018-07-13 22:40:26 -0700
committerRyan Prichard <rprichard@google.com>2018-07-26 20:31:47 -0700
commit9729f35922aee4d1662b97d62d82385f6b8124ef (patch)
tree644ed730855f795498485521d6216bb7e9e9d2d1 /libc/malloc_debug/malloc_debug.cpp
parent3bf897e12d73f5c038aeef85f91ccce1c35fe326 (diff)
linker: find AT_BASE using AT_PHDR/AT_PHNUM
When the linker is invoked directly, rather than as an interpreter for a real program, the AT_BASE value is 0. To find the linker's base address, the linker currently relies on the static linker populating the target of a RELA relocation with an offset rather than leaving it zero. (With lld, it will require a special flag, --apply-dynamic-relocs.) Instead, do something more straightforward: the linker already finds the executable's base address using its PHDR table, so do the same thing when the linker is run by itself. Bug: http://b/72789859 Test: boots, run linker/linker64 by itself Change-Id: I4da5c346ca164ea6f4fbc011f8c3db4e6a829456
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
0 files changed, 0 insertions, 0 deletions