aix: ensure reference to __tls_get_addr is in text section.
authorClément Chigot <clement.chigot@atos.net>
Thu, 14 Oct 2021 07:03:13 +0000 (09:03 +0200)
committerClément Chigot <clement.chigot@atos.net>
Tue, 19 Oct 2021 12:42:45 +0000 (14:42 +0200)
commite3ef92e79f9f1c4275a9e19652439089a310627d
tree3fa516ed866cb9b61b3f30d61085ed5a52beac6e
parent6b34f5c5ec75823d656b6882f12d46248402a2aa
aix: ensure reference to __tls_get_addr is in text section.

The garbage collector of AIX linker might remove the reference to
__tls_get_addr if it's added inside an unused csect, which can be
the case of .data with very simple programs.

gcc/ChangeLog:
2021-10-19  Clément Chigot  <clement.chigot@atos.net>

* config/rs6000/rs6000.c (rs6000_xcoff_file_end): Move
__tls_get_addr reference to .text csect.
gcc/config/rs6000/rs6000.c