+2018-08-11 John Darrington <john@darrington.wattle.id.au>
+
+ * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
+ (_bfd_clear_contents): Likewise.
+ (bfd_perform_relocation): Likewise.
+ (bfd_install_relocation): Likewise.
+
2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
PR ld/23499
{
case 5:
{
- long x = bfd_get_32 (abfd, (bfd_byte *) data + octets);
- x >>= 8;
+ long x = bfd_get_24 (abfd, (bfd_byte *) data + octets);
DOIT (x);
- bfd_put_16 (abfd, (bfd_vma) (x >> 8), (bfd_byte *) data + octets);
- bfd_put_8 (abfd, (x & 0xFF), (unsigned char *) data + 2 + octets);
+ bfd_put_24 (abfd, (bfd_vma) x, (unsigned char *) data + octets);
}
break;
bfd_put_32 (abfd, (bfd_vma) x, data);
}
break;
+ case 5:
+ {
+ long x = bfd_get_24 (abfd, data);
+ DOIT (x);
+ bfd_put_24 (abfd, (bfd_vma) x, data);
+ }
+ break;
case -2:
{
long x = bfd_get_32 (abfd, data);
case 2:
x = bfd_get_16 (input_bfd, location);
break;
+ case 3:
+ x = bfd_get_24 (input_bfd, location);
+ break;
case 4:
x = bfd_get_32 (input_bfd, location);
break;
case 2:
bfd_put_16 (input_bfd, x, location);
break;
+ case 3:
+ bfd_put_24 (input_bfd, x, location);
+ break;
case 4:
bfd_put_32 (input_bfd, x, location);
break;
case 2:
x = bfd_get_16 (input_bfd, location);
break;
+ case 3:
+ x = bfd_get_24 (input_bfd, location);
+ break;
case 4:
x = bfd_get_32 (input_bfd, location);
break;
case 2:
bfd_put_16 (input_bfd, x, location);
break;
+ case 3:
+ bfd_put_24 (input_bfd, x, location);
+ break;
case 4:
bfd_put_32 (input_bfd, x, location);
break;