1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

R_ALPHA_RELATIVE relocations need to add the value to the existing memory

contents.
This commit is contained in:
Doug Rabson 1998-10-18 19:04:13 +00:00
parent 589e38a609
commit 0c942a8eef
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40517
2 changed files with 6 additions and 6 deletions

View File

@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: elf_machdep.c,v 1.1 1998/09/11 08:47:02 dfr Exp $
* $Id: elf_machdep.c,v 1.2 1998/10/16 03:54:59 peter Exp $
*/
#include <sys/param.h>
@ -97,7 +97,7 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym)
break;
case R_ALPHA_RELATIVE:
addr = relocbase + addend;
addr = relocbase + addend + *where;
if (*where != addr)
*where = addr;
break;
@ -112,7 +112,7 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym)
default:
printf("kldload: unexpected relocation type %d\n",
rtype);
(int) rtype);
return -1;
}
return(0);

View File

@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: elf_machdep.c,v 1.1 1998/09/11 08:47:02 dfr Exp $
* $Id: elf_machdep.c,v 1.2 1998/10/16 03:54:59 peter Exp $
*/
#include <sys/param.h>
@ -97,7 +97,7 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym)
break;
case R_ALPHA_RELATIVE:
addr = relocbase + addend;
addr = relocbase + addend + *where;
if (*where != addr)
*where = addr;
break;
@ -112,7 +112,7 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym)
default:
printf("kldload: unexpected relocation type %d\n",
rtype);
(int) rtype);
return -1;
}
return(0);