This is an archive of the discontinued LLVM Phabricator instance.

[builtins] Do not set hidden attribute on Android
ClosedPublic

Authored by kongyi on Jan 20 2019, 6:16 AM.

Details

Summary

Bionic libc relies on an old libgcc behaviour which does not set hidden visibility attribute. Keep exporting these symbols on Android for compatibility.

Diff Detail

Repository
rL LLVM

Event Timeline

kongyi created this revision.Jan 20 2019, 6:16 AM
Herald added subscribers: Restricted Project, llvm-commits, mgorny. · View Herald TranscriptJan 20 2019, 6:16 AM
srhines accepted this revision.Jan 22 2019, 4:46 PM
This revision is now accepted and ready to land.Jan 22 2019, 4:46 PM
This revision was automatically updated to reflect the committed changes.

Keep exporting these symbols on Android for compatibility.

For posterity, I think we want the builtins symbols not-hidden so that they can be exported from libc.so and libm.so on 32-bit targets, e.g.:

  • for arm32: many __aeabi_* libc.so functions, __fixunsdfdi in libm.so, ...
  • for x86: __divdi3, __popcountsi2, __udivdi3, __umoddi3

The platform continues to export these builtins for backwards compatibility with old binaries.