The reference to __tls_get_addr is in the data section. And the code just above creates a symbol in the text section referenced from the data section to ensure the text section is retained. So this change doesn't make sense. You're essentially saying that the data section is not used, which makes the other code useless to ensure that the text section is referenced.
Thanks, David On Thu, Oct 14, 2021 at 3:06 AM CHIGOT, CLEMENT <clement.chi...@atos.net> wrote: > > The garbage collector of AIX linker might remove the reference to > __tls_get_addr if it's added inside an unused csect. > > > Clément Chigot > ATOS Bull SAS > 1 rue de Provence - 38432 Échirolles - France >