mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:18:12 +00:00
LibC: Link statically with libstdc++
This allows us to have the implementation of __cxa_demangle in libc.so.
This commit is contained in:
parent
706a8c05fd
commit
dfdd977a82
3 changed files with 2 additions and 10 deletions
|
@ -66,7 +66,7 @@ add_custom_command(
|
|||
)
|
||||
|
||||
set(SOURCES ${LIBC_SOURCES} ${AK_SOURCES} ${ELF_SOURCES})
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++")
|
||||
serenity_libc(LibC c)
|
||||
target_link_libraries(LibC crt0)
|
||||
add_dependencies(LibC LibM)
|
||||
|
|
|
@ -420,11 +420,6 @@ Elf32_Addr DynamicObject::patch_plt_entry(u32 relocation_offset)
|
|||
ASSERT(relocation.type() == R_386_JMP_SLOT);
|
||||
|
||||
auto sym = relocation.symbol();
|
||||
if (StringView { sym.name() } == "__cxa_demangle") {
|
||||
dbgln("__cxa_demangle is currently not supported for shared objects");
|
||||
// FIXME: Where is it defined?
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
u8* relocation_address = relocation.address().as_ptr();
|
||||
auto res = lookup_symbol(sym);
|
||||
|
|
|
@ -264,10 +264,7 @@ String Loader::symbolicate(u32 address, u32* out_offset) const
|
|||
#else
|
||||
auto& demangled_name = symbol.demangled_name;
|
||||
if (demangled_name.is_null()) {
|
||||
|
||||
// FIXME: Temporarily disabled demangling since it is currently not supported with shared libraries
|
||||
demangled_name = symbol.name;
|
||||
// demangled_name = demangle(symbol.name);
|
||||
demangled_name = demangle(symbol.name);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue