Module Name: src
Committed By: martin
Date: Thu Oct 3 10:45:57 UTC 2013
Modified Files:
src/libexec/ld.elf_so/arch/sparc64: mdreloc.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/libexec/ld.elf_so/arch/sparc64/mdreloc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/libexec/ld.elf_so/arch/sparc64/mdreloc.c
diff -u src/libexec/ld.elf_so/arch/sparc64/mdreloc.c:1.54 src/libexec/ld.elf_so/arch/sparc64/mdreloc.c:1.55
--- src/libexec/ld.elf_so/arch/sparc64/mdreloc.c:1.54 Mon Sep 23 21:00:35 2013
+++ src/libexec/ld.elf_so/arch/sparc64/mdreloc.c Thu Oct 3 10:45:57 2013
@@ -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 @@ static const long reloc_target_bitmask[]
_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
};