HomePhabricator

[ELF] Drop .rel[a].debug_gnu_pub{names,types} for --gdb-index --emit-relocs

Authored by MaskRay on Tue, Jan 12, 12:07 AM.

Description

[ELF] Drop .rel[a].debug_gnu_pub{names,types} for --gdb-index --emit-relocs

Fixes PR48693: --emit-relocs keeps relocation sections. --gdb-index drops
.debug_gnu_pubnames and .debug_gnu_pubtypes but not their relocation sections.
This can cause a null pointer dereference in getOutputSectionName.

Also delete debug-gnu-pubnames.s which is covered by gdb-index.s

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D94354

Details