public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: Don't check relocation overflow for x32.
@ 2011-02-16 14:59 H.J. Lu
  2011-02-17 13:52 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2011-02-16 14:59 UTC (permalink / raw)
  To: binutils

I checked in this patch.


H.J.
---
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1ab968c..7ce8b2f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_check_relocs): Check relocation
+	overflow only for ABI_64_P.
+	(elf_x86_64_relocate_section): Likewise.
+
 2011-02-15  Tristan Gingold  <gingold@adacore.com>
 
 	* vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 343abce..70fe9b1 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1498,6 +1498,7 @@ not_pointer:
 	     sections we don't care about, such as debug sections or
 	     non-constant sections.  */
 	  if (info->shared
+	      && ABI_64_P (abfd)
 	      && (sec->flags & SEC_ALLOC) != 0
 	      && (sec->flags & SEC_READONLY) != 0)
 	    {
@@ -3148,6 +3149,7 @@ elf_x86_64_relocate_section (bfd *output_bfd,
 	     for shared library since it may not be local when used
 	     as function address.  */
 	  if (info->shared
+	      && ABI_64_P (output_bfd)
 	      && h
 	      && h->def_regular
 	      && h->type == STT_FUNC

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: Don't check relocation overflow for x32.
  2011-02-16 14:59 PATCH: Don't check relocation overflow for x32 H.J. Lu
@ 2011-02-17 13:52 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2011-02-17 13:52 UTC (permalink / raw)
  To: binutils

On Wed, Feb 16, 2011 at 06:58:52AM -0800, H.J. Lu wrote:
> I checked in this patch.
> 
> 
> H.J.
> ---
> diff --git a/bfd/ChangeLog b/bfd/ChangeLog
> index 1ab968c..7ce8b2f 100644
> --- a/bfd/ChangeLog
> +++ b/bfd/ChangeLog
> @@ -1,3 +1,9 @@
> +2011-02-16  H.J. Lu  <hongjiu.lu@intel.com>
> +
> +	* elf64-x86-64.c (elf_x86_64_check_relocs): Check relocation
> +	overflow only for ABI_64_P.
> +	(elf_x86_64_relocate_section): Likewise.
> +
>  2011-02-15  Tristan Gingold  <gingold@adacore.com>
>  
>  	* vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
> diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
> index 343abce..70fe9b1 100644
> --- a/bfd/elf64-x86-64.c
> +++ b/bfd/elf64-x86-64.c
> @@ -1498,6 +1498,7 @@ not_pointer:
>  	     sections we don't care about, such as debug sections or
>  	     non-constant sections.  */
>  	  if (info->shared
> +	      && ABI_64_P (abfd)
>  	      && (sec->flags & SEC_ALLOC) != 0
>  	      && (sec->flags & SEC_READONLY) != 0)
>  	    {
> @@ -3148,6 +3149,7 @@ elf_x86_64_relocate_section (bfd *output_bfd,
>  	     for shared library since it may not be local when used
>  	     as function address.  */
>  	  if (info->shared
> +	      && ABI_64_P (output_bfd)
>  	      && h
>  	      && h->def_regular
>  	      && h->type == STT_FUNC

This patch is wrong. I reverted it.


H.J.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-17 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-16 14:59 PATCH: Don't check relocation overflow for x32 H.J. Lu
2011-02-17 13:52 ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).