[Bug 37301] New: Unable to display statically initialized pointers on arm64 (linux?) without a running process

Bug ID 37301
Summary Unable to display statically initialized pointers on arm64 (linux?) without a running process
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter labath@google.com
CC llvm-bugs@lists.llvm.org

This happens because the pointer, even though "initialized" statically, will
leave behind a runtime relocation (at least for PIC) to be fixed up by the
dynamic linker. When lldb goes to read the value of the variable from the
object file, it just sees a zero.

On other architectures this works, though mostly by luck as the linker uses a
relocation without an explicit addend, so the value in the object file happens
to be the right pointer without the relocation applied (this applies mainly to
ELF, I don't know whether we have better relocation handling for MachO).

Omair Javaid changed bug 37301

What | Removed | Added |

Comment # 1 on bug 37301 from Omair Javaid

This works TOT as of today on arm/aarch64 linux.

Tested on Ubuntu Bionic and Xenial.