[Openmp-commits] [PATCH] D107698: [libomptarget][amdgpu] use --allow-shlib-undefined to link on FreeBSD

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Aug 8 05:17:51 PDT 2021


JonChesterfield added a comment.

Thanks for the context!

So glibc puts the environ symbol in the crt that is linked into the top level executable and a weak symbol in dynamic libraries. That sounds like something that does not work - weak symbols are a link time thing, not a load time thing - but a short walk down that rabbit hole suggests glibc's loader used to replace weak symbols with strong ones when both were present. I vaguely wonder if that is the case if the main executable is missing the dynamic symbol table. No doubt glibc has adequately aligned things to that this continues to work as intended.

I am curious what the behaviour of weak symbol in a dynamic library + normal symbol in main (or another dynamic library) is on the various libc implementations but will resist pulling on that string for now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107698/new/

https://reviews.llvm.org/D107698



More information about the Openmp-commits mailing list