[PATCH] D606: Introduce GlobalAlias::mayBeResolved().

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 18 15:21:36 PST 2020


MaskRay added a comment.
Herald added subscribers: haicheng, eraman.

I like the idea. 7 years have passed... We still miss the optimization opportunity:

  int _rtld_global;
  extern int _rtld_local __attribute__((visibility("hidden"), alias("_rtld_global")));
  
  int get() { return _rtld_local; }

`gcc -fPIC -O3 -fno-common -c a.c` => `R_X86_64_PC32`
`clang -fPIC -O3 -fno-common -c a.c` => `R_X86_64_GOTPCREL`


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

https://reviews.llvm.org/D606





More information about the llvm-commits mailing list