mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 18:39:34 +08:00
* reloc.c (bfd_perform_relocation): Apply the relocation even if
it is zero, in case src_mask matters. (bfd_install_relocation): Likewise. PR 10685.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Fri Sep 20 11:43:43 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* reloc.c (bfd_perform_relocation): Apply the relocation even if
|
||||||
|
it is zero, in case src_mask matters.
|
||||||
|
(bfd_install_relocation): Likewise.
|
||||||
|
|
||||||
Thu Sep 19 11:03:06 1996 Ian Lance Taylor <ian@cygnus.com>
|
Thu Sep 19 11:03:06 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* xcofflink.c (xcoff_link_add_symbols): Always initialize
|
* xcofflink.c (xcoff_link_add_symbols): Always initialize
|
||||||
|
101
bfd/reloc.c
101
bfd/reloc.c
@ -872,20 +872,18 @@ space consuming. For each target:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
if (relocation)
|
{
|
||||||
{
|
short x = bfd_get_16 (abfd, (bfd_byte *) data + addr);
|
||||||
short x = bfd_get_16 (abfd, (bfd_byte *) data + addr);
|
DOIT (x);
|
||||||
DOIT (x);
|
bfd_put_16 (abfd, x, (unsigned char *) data + addr);
|
||||||
bfd_put_16 (abfd, x, (unsigned char *) data + addr);
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (relocation)
|
{
|
||||||
{
|
long x = bfd_get_32 (abfd, (bfd_byte *) data + addr);
|
||||||
long x = bfd_get_32 (abfd, (bfd_byte *) data + addr);
|
DOIT (x);
|
||||||
DOIT (x);
|
bfd_put_32 (abfd, x, (bfd_byte *) data + addr);
|
||||||
bfd_put_32 (abfd, x, (bfd_byte *) data + addr);
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case -2:
|
case -2:
|
||||||
{
|
{
|
||||||
@ -911,12 +909,11 @@ space consuming. For each target:
|
|||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
#ifdef BFD64
|
#ifdef BFD64
|
||||||
if (relocation)
|
{
|
||||||
{
|
bfd_vma x = bfd_get_64 (abfd, (bfd_byte *) data + addr);
|
||||||
bfd_vma x = bfd_get_64 (abfd, (bfd_byte *) data + addr);
|
DOIT (x);
|
||||||
DOIT (x);
|
bfd_put_64 (abfd, x, (bfd_byte *) data + addr);
|
||||||
bfd_put_64 (abfd, x, (bfd_byte *) data + addr);
|
}
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
abort ();
|
abort ();
|
||||||
#endif
|
#endif
|
||||||
@ -1332,20 +1329,18 @@ space consuming. For each target:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
if (relocation)
|
{
|
||||||
{
|
short x = bfd_get_16 (abfd, (bfd_byte *) data);
|
||||||
short x = bfd_get_16 (abfd, (bfd_byte *) data);
|
DOIT (x);
|
||||||
DOIT (x);
|
bfd_put_16 (abfd, x, (unsigned char *) data);
|
||||||
bfd_put_16 (abfd, x, (unsigned char *) data);
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (relocation)
|
{
|
||||||
{
|
long x = bfd_get_32 (abfd, (bfd_byte *) data);
|
||||||
long x = bfd_get_32 (abfd, (bfd_byte *) data);
|
DOIT (x);
|
||||||
DOIT (x);
|
bfd_put_32 (abfd, x, (bfd_byte *) data);
|
||||||
bfd_put_32 (abfd, x, (bfd_byte *) data);
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case -2:
|
case -2:
|
||||||
{
|
{
|
||||||
@ -1361,12 +1356,11 @@ space consuming. For each target:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
if (relocation)
|
{
|
||||||
{
|
bfd_vma x = bfd_get_64 (abfd, (bfd_byte *) data);
|
||||||
bfd_vma x = bfd_get_64 (abfd, (bfd_byte *) data);
|
DOIT (x);
|
||||||
DOIT (x);
|
bfd_put_64 (abfd, x, (bfd_byte *) data);
|
||||||
bfd_put_64 (abfd, x, (bfd_byte *) data);
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return bfd_reloc_other;
|
return bfd_reloc_other;
|
||||||
@ -2247,6 +2241,41 @@ ENUMDOC
|
|||||||
COMMENT
|
COMMENT
|
||||||
{* end-sanitize-d10v *}
|
{* end-sanitize-d10v *}
|
||||||
|
|
||||||
|
COMMENT
|
||||||
|
{* start-sanitize-m32r *}
|
||||||
|
ENUM
|
||||||
|
BFD_RELOC_M32R_10_PCREL
|
||||||
|
ENUMDOC
|
||||||
|
Mitsubishi M32R relocs.
|
||||||
|
This is a 10-bit reloc with the right 2 bits assumed to be 0.
|
||||||
|
ENUM
|
||||||
|
BFD_RELOC_M32R_18_PCREL
|
||||||
|
ENUMDOC
|
||||||
|
This is an 18-bit reloc with the right 2 bits assumed to be 0.
|
||||||
|
ENUM
|
||||||
|
BFD_RELOC_M32R_26_PCREL
|
||||||
|
ENUMDOC
|
||||||
|
This is an 26-bit reloc with the right 2 bits assumed to be 0.
|
||||||
|
ENUM
|
||||||
|
BFD_RELOC_M32R_24
|
||||||
|
ENUMDOC
|
||||||
|
This is a 24 bit reloc.
|
||||||
|
COMMENT
|
||||||
|
{* end-sanitize-m32r *}
|
||||||
|
|
||||||
|
COMMENT
|
||||||
|
{* start-sanitize-v850 *}
|
||||||
|
ENUM
|
||||||
|
BFD_RELOC_V850_9_PCREL
|
||||||
|
ENUMDOC
|
||||||
|
This is a 9-bit reloc
|
||||||
|
ENUM
|
||||||
|
BFD_RELOC_V850_22_PCREL
|
||||||
|
ENUMDOC
|
||||||
|
This is a 22-bit reloc
|
||||||
|
COMMENT
|
||||||
|
{* end-sanitize-v850 *}
|
||||||
|
|
||||||
ENDSENUM
|
ENDSENUM
|
||||||
BFD_RELOC_UNUSED
|
BFD_RELOC_UNUSED
|
||||||
CODE_FRAGMENT
|
CODE_FRAGMENT
|
||||||
|
Reference in New Issue
Block a user