Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/binutils/dist/gas Don't allow a symbol + offse...



details:   https://anonhg.NetBSD.org/src/rev/97c982663eec
branches:  trunk
changeset: 750452:97c982663eec
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Jan 01 06:12:55 2010 +0000

description:
Don't allow a symbol + offset in a merge section to translated to a
.section + offset reference if offset is negative.

diffstat:

 external/gpl3/binutils/dist/gas/write.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (18 lines):

diff -r cc1f8e021aac -r 97c982663eec external/gpl3/binutils/dist/gas/write.c
--- a/external/gpl3/binutils/dist/gas/write.c   Fri Jan 01 03:22:13 2010 +0000
+++ b/external/gpl3/binutils/dist/gas/write.c   Fri Jan 01 06:12:55 2010 +0000
@@ -822,10 +822,11 @@
          }
 
        /* Never adjust a reloc against local symbol in a merge section with
-          a non-zero addend if the addend would place the relocation otside
-          the section's limits.  */
+          a non-negative addend or if the addend would place the relocation
+          outside the section's limits.  */
        if ((symsec->flags & SEC_MERGE) != 0
-           && (S_GET_VALUE(sym) + fixp->fx_offset >= bfd_get_section_size(symsec)
+           && (S_GET_VALUE(sym) + fixp->fx_offset < S_GET_VALUE(sym)
+               || S_GET_VALUE(sym) + fixp->fx_offset >= bfd_get_section_size(symsec)
                || fixp->fx_subsy != NULL))
          continue;
 



Home | Main Index | Thread Index | Old Index