tls-desc-ie.s 602 B

1234567891011121314151617181920212223242526272829303132
  1. .global v1
  2. .global v2
  3. .section .tdata,"awT",%progbits
  4. v1:
  5. .word 1
  6. .text
  7. # This GD access does not relax. It consumes a double GOT slot.
  8. adrp x0, :tlsgd:v2
  9. add x0, x0, :tlsgd_lo12:v2
  10. bl __tls_get_addr
  11. nop
  12. # Test the combination of a TLSDESC-GD and IE access to the same
  13. # symbol. We expect the TLSDESC-GD to relax to IE.
  14. adrp x0, :tlsdesc:v1
  15. ldr x1, [x0, #:tlsdesc_lo12:v1]
  16. add x0, x0, :tlsdesc_lo12:v1
  17. .tlsdesccall v1
  18. blr x1
  19. mrs x1, tpidr_el0
  20. add x0, x1, x0
  21. mrs x2, tpidr_el0
  22. adrp x0, :gottprel:v1
  23. ldr x0, [x0, #:gottprel_lo12:v1]
  24. add x0, x2, x0
  25. ldr w0, [x0]
  26. add w0, w1, w0