summary refs log tree commit diff
path: root/io/closefrom.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-11-06 09:38:09 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-11-22 14:49:11 -0300
commitaac54dcd378209bbdddbcec749561b1d8f167d11 (patch)
tree5f3102ec38089693210ca3a9d6a7369a3fa54129 /io/closefrom.c
parentbc801b3a40f3a9bc8f24f1d0fdc39413874c3172 (diff)
downloadglibc-aac54dcd378209bbdddbcec749561b1d8f167d11.tar.gz
glibc-aac54dcd378209bbdddbcec749561b1d8f167d11.tar.xz
glibc-aac54dcd378209bbdddbcec749561b1d8f167d11.zip
powerpc: Define USE_PPC64_NOTOC iff compiler supports it
The @notoc usage only yields an advantage on ISA 3.1+ machine (power10)
and for ld.bfd also when it sees pcrel relocations used on the code
(generated if compiler targets ISA 3.1+).  On bfd case ISA 3.1+
instruction on stubs are used iff linker also sees the new pc-relative
relocations (for instance R_PPC64_D34), otherwise it generates default
stubs (ppc64_elf_check_relocs:4700).

This patch also help on linkers that do not implement this optimization,
since building for older ISA (such as 3.0 / power9) will also trigger
power10 stubs generation in the assembly code uses the NOTOC imacro.

Checked on powerpc64le-linux-gnu.

Reviewed-by: Fangrui Song <maskray@google.com>
Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Diffstat (limited to 'io/closefrom.c')
0 files changed, 0 insertions, 0 deletions