mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-12 10:28:59 +08:00
PR ld/13254
include/ * bfdlink.h (struct bfd_link_info): Add error_textrel. bfd/ * elflink.c (bfd_elf_final_link): Emit error_textrel error. ld/ * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add -z text, -z notext, -z textoff options for all targets having shared lib support.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2011-10-19 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR ld/13254
|
||||||
|
* elflink.c (bfd_elf_final_link): Emit error_textrel error.
|
||||||
|
|
||||||
2011-10-18 David S. Miller <davem@davemloft.net>
|
2011-10-18 David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
PR binutils/13301
|
PR binutils/13301
|
||||||
|
@ -11187,7 +11187,8 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
|
|||||||
goto error_return;
|
goto error_return;
|
||||||
|
|
||||||
/* Check for DT_TEXTREL (late, in case the backend removes it). */
|
/* Check for DT_TEXTREL (late, in case the backend removes it). */
|
||||||
if (info->warn_shared_textrel && info->shared)
|
if ((info->warn_shared_textrel && info->shared)
|
||||||
|
|| info->error_textrel)
|
||||||
{
|
{
|
||||||
bfd_byte *dyncon, *dynconend;
|
bfd_byte *dyncon, *dynconend;
|
||||||
|
|
||||||
@ -11205,8 +11206,12 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
|
|||||||
|
|
||||||
if (dyn.d_tag == DT_TEXTREL)
|
if (dyn.d_tag == DT_TEXTREL)
|
||||||
{
|
{
|
||||||
info->callbacks->einfo
|
if (info->error_textrel)
|
||||||
(_("%P: warning: creating a DT_TEXTREL in a shared object.\n"));
|
info->callbacks->einfo
|
||||||
|
(_("%P%X: read-only segment has dynamic relocations.\n"));
|
||||||
|
else
|
||||||
|
info->callbacks->einfo
|
||||||
|
(_("%P: warning: creating a DT_TEXTREL in a shared object.\n"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2011-10-19 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR ld/13254
|
||||||
|
* bfdlink.h (struct bfd_link_info): Add error_textrel.
|
||||||
|
|
||||||
2011-09-28 Doug Evans <dje@google.com>
|
2011-09-28 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
* timeval-utils.h: New file.
|
* timeval-utils.h: New file.
|
||||||
|
@ -337,6 +337,9 @@ struct bfd_link_info
|
|||||||
/* TRUE if we should warn when adding a DT_TEXTREL to a shared object. */
|
/* TRUE if we should warn when adding a DT_TEXTREL to a shared object. */
|
||||||
unsigned int warn_shared_textrel: 1;
|
unsigned int warn_shared_textrel: 1;
|
||||||
|
|
||||||
|
/* TRUE if we should error when adding a DT_TEXTREL. */
|
||||||
|
unsigned int error_textrel: 1;
|
||||||
|
|
||||||
/* TRUE if .hash section should be created. */
|
/* TRUE if .hash section should be created. */
|
||||||
unsigned int emit_hash: 1;
|
unsigned int emit_hash: 1;
|
||||||
|
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2011-10-19 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR ld/13254
|
||||||
|
* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
|
||||||
|
-z text, -z notext, -z textoff options for all targets having
|
||||||
|
shared lib support.
|
||||||
|
|
||||||
2011-10-15 Alan Modra <amodra@gmail.com>
|
2011-10-15 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Remove toc check.
|
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Remove toc check.
|
||||||
|
@ -2327,6 +2327,12 @@ fragment <<EOF
|
|||||||
link_info.relro = TRUE;
|
link_info.relro = TRUE;
|
||||||
else if (strcmp (optarg, "norelro") == 0)
|
else if (strcmp (optarg, "norelro") == 0)
|
||||||
link_info.relro = FALSE;
|
link_info.relro = FALSE;
|
||||||
|
else if (strcmp (optarg, "text") == 0)
|
||||||
|
link_info.error_textrel = TRUE;
|
||||||
|
else if (strcmp (optarg, "notext") == 0)
|
||||||
|
link_info.error_textrel = FALSE;
|
||||||
|
else if (strcmp (optarg, "textoff") == 0)
|
||||||
|
link_info.error_textrel = FALSE;
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user