aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/integer-overflow.c
diff options
context:
space:
mode:
authorGeorgiy Samoylov <g.samoylov@syntacore.com>2025-10-02 01:40:42 +0300
committerGitHub <noreply@github.com>2025-10-01 15:40:42 -0700
commitb181c22c54bd8c3f6d8a3071661572c5782a7a30 (patch)
tree49306984043e4c5d9986ad292cff6f3068dfe60d /clang/test/CodeGen/integer-overflow.c
parent11a4b2d950baa4ddb31505b71a1736fa1f3242b6 (diff)
downloadllvm-b181c22c54bd8c3f6d8a3071661572c5782a7a30.zip
llvm-b181c22c54bd8c3f6d8a3071661572c5782a7a30.tar.gz
llvm-b181c22c54bd8c3f6d8a3071661572c5782a7a30.tar.bz2
[lldb][RISCV] Fixed TestSymbolFileJSON for RISC-V (#161497)
This test failed during testing on the RISC-V target because we couldn't strip the main label from the binary. main is dynamically linked when the -fPIC flag is enabled. The RISC-V ABI requires that executables support loading at arbitrary addresses to enable shared libraries and secure loading (ASLR). In PIC mode, function addresses cannot be hardcoded in the code. Instead, code is generated to load addresses from the GOT/PLT tables, which are initialized by the dynamic loader. The reference to main thus ends up in .dynsym and is dynamically bound. We cannot strip main or any other dynamically linked functions because these functions are referenced indirectly via dynamic linking tables (.plt and .got). Removing these symbols would break the dynamic linking mechanism needed to resolve function addresses at runtime, causing the executable to fail to correctly call them.
Diffstat (limited to 'clang/test/CodeGen/integer-overflow.c')
0 files changed, 0 insertions, 0 deletions