Add --add-debug option

A shared library (-shared) by default does not receive DT_DEBUG tag.
This means that when a shared library has an entry point (so that it
can be run as an executable), the debugger does not connect to it
correctly and symbols are not resolved.

--add-debug option adds DT_DEBUG tag if it not yet present to an ELF
object.
This commit is contained in:
deadwood
2022-02-20 11:32:45 +01:00
parent a992616722
commit c6c4304ed6
2 changed files with 42 additions and 0 deletions

View File

@@ -131,6 +131,8 @@ public:
void noDefaultLib();
void addDebug();
void clearSymbolVersions(const std::set<std::string> & syms);
private: