e7fdaf0 arm64: Emit hidden alias for each global symbol.

Authored and Committed by rjones 6 years ago
    arm64: Emit hidden alias for each global symbol.
    
    MPR#7585
    PR#1268
    
    binutils 2.29 arm64 linker is more strict about when to perform
    pc-relative relocations for global symbols. Specifically, they must be
    marked as .hidden.  ocaml arm64 codegen does not do this, so
    tests/lib-dynlink-native/ fails as some symbols were not relocated.
    
    This patch fixes that by emitting a hidden alias for each global
    symbol and using the hidden alias in (non-GOT) adrp instructions.
    
    The aliases appear in the asm output as:
    
      .L1234:
         .hidden .L1234$hidden
         .set    .L1234$hidden,.L1234
    
     camlFoo__bar:
         .hidden camlFoo__bar$hidden
         .set    camlFoo__bar$hidden,camlFoo__bar
    
        
file modified
+38 -14