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

Whitelist undefined symbols? #182

Open
TimNN opened this Issue Jul 23, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@TimNN
Contributor

TimNN commented Jul 23, 2017

In #181 (comment), @alexcrichton asked:

I wonder if it'd be possible to add a test for this [compiler-builtins (not) depending on memcpy] as well?

I think the issue is a bit more general, in that we should check that only a known list of symbols is undefined, this can be done (on x86_64 linux) like this:

$ mkdir tmp && cd tmp
$ ar x $DIR/libcompiler_builtins-614d629936883e62.rlib
$ ld -r -o tmp.o *.o
$ nm -u tmp.o

The output (before #181) looks something like this:

                 U abort
                 U fmax
                 U fmaxf
                 U fmaxl
                 U _GLOBAL_OFFSET_TABLE_
                 U logb
                 U logbf
                 U logbl
                 U memcpy
                 U rust_eh_personality
                 U scalbn
                 U scalbnf
                 U scalbnl
                 U _Unwind_Resume
                 U _ZN4core9panicking9panic_old17hd5ed84fef9dfdb68E
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment