GithubHelp home page GithubHelp logo

Comments (7)

arnetheduck avatar arnetheduck commented on June 25, 2024

Regarding the last point, without a linker script or -fvisibility=hidden, the code can not be linked into a pic/pie executable due to lack of the right kind of relocations necessary for default-linkage symbols, making the build fail on __blst_platform_cap requires dynamic R_X86_64_PC32 reloc against....

from blst.

dot-asm avatar dot-asm commented on June 25, 2024

Currently, symbol exports are controlled via a linker script

Not anymore:-) But even if it still was, you can rely on the fact that private symbols originating from C are all static and those coming from assembly module - hidden. As build.sh does now.

__blst_platform_cap should ideally be marked with hidden visibility

Done. [There also were hidden directives missing in src/asm/ct_* modules.] Thanks!

from blst.

arnetheduck avatar arnetheduck commented on June 25, 2024

you can rely on the fact that private symbols originating from C are all static

cap was not, which caused a fair bit of headscratching ;) thanks for looking into it.

from blst.

dot-asm avatar dot-asm commented on June 25, 2024

can not be linked into a pic/pie executable due to lack of the right kind of relocations necessary for default-linkage symbols

-Bsymbolic is the answer to this question. It's argued that the option is more than appropriate, even necessary, for security libraries. Point is that symbols in non-Bsymbolic modules are easily overridden by other modules leaving you not knowing what's going on.

from blst.

arnetheduck avatar arnetheduck commented on June 25, 2024

thanks, lgtm! closing, was able to integrate successfully

from blst.

arnetheduck avatar arnetheduck commented on June 25, 2024

-Bsymbolic - I would assume that for hidden symbols, this wouldn't be a problem?

from blst.

dot-asm avatar dot-asm commented on June 25, 2024

-Bsymbolic - I would assume that for hidden symbols, this wouldn't be a problem?

Correct. Linking to .hidden symbols is equivalent to -Bsymbolic. -Bsymbolic is still appropriate though, it helps in cases you both refer to a symbol internally and export it.

from blst.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.