aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-03-01 12:35:03 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-02-01 20:46:08 +0000
commit2a0b8e2f38df0196f88c76e03e64bb6d43ce317c (patch)
tree8f8e9ac2c7edae4f8a4fb19a7115b406407a49ef
parentGentoo: Pass --no-warn-shared-textrel to ld in its testsuite (diff)
downloadbinutils-gdb-2a0b8e2f38df0196f88c76e03e64bb6d43ce317c.tar.gz
binutils-gdb-2a0b8e2f38df0196f88c76e03e64bb6d43ce317c.tar.bz2
binutils-gdb-2a0b8e2f38df0196f88c76e03e64bb6d43ce317c.zip
Gentoo: Restore TEXTREL warnings for non-shared objects
-rw-r--r--bfd/elflink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 5217528a79b..3239036656b 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -12816,7 +12816,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
goto error_return;
/* Check for DT_TEXTREL (late, in case the backend removes it). */
- if (((info->warn_shared_textrel && bfd_link_pic (info))
+ if ((info->warn_shared_textrel
|| info->error_textrel)
&& (o = bfd_get_linker_section (dynobj, ".dynamic")) != NULL)
{
@@ -12837,7 +12837,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
(_("%P%X: read-only segment has dynamic relocations\n"));
else
info->callbacks->einfo
- (_("%P: warning: creating a DT_TEXTREL in a shared object\n"));
+ (_("%P: warning: creating a DT_TEXTREL in object\n"));
break;
}
}