Skip to content

Commit

Permalink
Merge pull request #242 from Amjad50/add-weak-support
Browse files Browse the repository at this point in the history
Add support for `weak` elf symbols
  • Loading branch information
Kingcom authored Apr 30, 2024
2 parents a8d71f0 + 2c5e169 commit 0febea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/ELF/ElfRelocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ bool ElfRelocator::init(const fs::path& inputName)
Elf32_Sym symbol;
elf->getSymbol(symbol, i);

if (ELF32_ST_BIND(symbol.st_info) == STB_GLOBAL && symbol.st_shndx != 0)
if ((ELF32_ST_BIND(symbol.st_info) == STB_GLOBAL || ELF32_ST_BIND(symbol.st_info) == STB_WEAK) && symbol.st_shndx != 0)
{
ElfRelocatorSymbol symEntry;
symEntry.type = ELF32_ST_TYPE(symbol.st_info);
Expand Down

0 comments on commit 0febea0

Please sign in to comment.