Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guix: re-enable exported symbol checking for RISC-V #28095

Open
fanquake opened this issue Jul 18, 2023 · 4 comments
Open

guix: re-enable exported symbol checking for RISC-V #28095

fanquake opened this issue Jul 18, 2023 · 4 comments
Assignees

Comments

@fanquake
Copy link
Member

This is currently disabled, when it can likely be fixed and re-enabled:

if binary.header.machine_type == lief.ELF.ARCH.RISCV or name in IGNORE_EXPORTS:

A Guix build with the exception dropped shows there are symbols being exported in the RISC-V bins:

/opt/homebrew/opt/binutils/bin/objdump -T bitcoind

0000000000080500  w   DF .text	00000000000000a6  Base        _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
000000000007f6a0  w   DF .text	0000000000000064  Base        _ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED1Ev
000000000007e9da  w   DF .text	0000000000000024  Base        _ZNKSt5ctypeIcE8do_widenEc

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> >(char const*, std::allocator<char> const&)
std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf()
std::ctype<char>::do_widen(char) const
@hebasto
Copy link
Member

hebasto commented Jul 19, 2023

Historically, symbol checking for RISC-V was skipped from the beginning for the following reason:

Need to skip RISC-V for now, the linker would export so many symbols.

@fanquake
Copy link
Member Author

I don't think that's relevant anymore? I've listed the exported symbols above. It's 3.

@laanwj
Copy link
Member

laanwj commented Apr 11, 2024

i'll try to figure out why it exports those three symbols, and if it is indication of a problem, and if not, add them to the exceptions

demangled, these are:

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> >(char const*, std::allocator<char> const&)
std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf()
std::ctype<char>::do_widen(char) const

@laanwj
Copy link
Member

laanwj commented Apr 29, 2024

Holding this off until #29987 is.merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants