diff options
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7d841e2..bbef105 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2019-07-18 Alan Modra <amodra@gmail.com> + + * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed + range of tp-relative offsets. + 2019-07-15 Alan Modra <amodra@gmail.com> * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index d77cfdf..9d3ba36 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -7734,9 +7734,8 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) { value += sym_sec->output_offset; value += sym_sec->output_section->vma; - value -= htab->elf.tls_sec->vma; - ok_tprel = (value + TP_OFFSET + ((bfd_vma) 1 << 31) - < (bfd_vma) 1 << 32); + value -= htab->elf.tls_sec->vma + TP_OFFSET; + ok_tprel = value + 0x80008000ULL < 1ULL << 32; } } |