Source-Changes-HG archive

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

[src/trunk]: src/libexec/ld.elf_so/arch/sparc64 The R_SPARC_L44 relocation ty...



details:   https://anonhg.NetBSD.org/src/rev/ba8ad5e24fe7
branches:  trunk
changeset: 790311:ba8ad5e24fe7
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Oct 03 10:45:57 2013 +0000

description:
The R_SPARC_L44 relocation type is documented to be truncating and
calculated as "(S + A) & 0xfff" - so while it (usually) sets a "imm13" field
in the opcode, only 12 bits of the calculated value can be used.

diffstat:

 libexec/ld.elf_so/arch/sparc64/mdreloc.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d56b59e49278 -r ba8ad5e24fe7 libexec/ld.elf_so/arch/sparc64/mdreloc.c
--- a/libexec/ld.elf_so/arch/sparc64/mdreloc.c  Thu Oct 03 07:35:37 2013 +0000
+++ b/libexec/ld.elf_so/arch/sparc64/mdreloc.c  Thu Oct 03 10:45:57 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mdreloc.c,v 1.54 2013/09/23 21:00:35 martin Exp $      */
+/*     $NetBSD: mdreloc.c,v 1.55 2013/10/03 10:45:57 martin Exp $      */
 
 /*-
  * Copyright (c) 2000 Eduardo Horvath.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: mdreloc.c,v 1.54 2013/09/23 21:00:35 martin Exp $");
+__RCSID("$NetBSD: mdreloc.c,v 1.55 2013/10/03 10:45:57 martin Exp $");
 #endif /* not lint */
 
 #include <errno.h>
@@ -183,7 +183,7 @@
        _BM(7), _BM(5), _BM(6),         /* _7, _5, _6 */
        -1, -1,                         /* DISP64, PLT64 */
        _BM(22), _BM(13),               /* HIX22, LOX10 */
-       _BM(22), _BM(10), _BM(13),      /* H44, M44, L44 */
+       _BM(22), _BM(10), _BM(12),      /* H44, M44, L44 */
        -1, -1, _BM(16),                /* REGISTER, UA64, UA16 */
 #undef _BM
 };



Home | Main Index | Thread Index | Old Index