mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 10:34:21 +08:00
PR26419, ASAN: mn10300_elf_relax_section elf-m10300.c:3943
PR 26419 * elf-m10300.c (mn10300_elf_relax_section): Don't attempt access before start of section.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2020-08-25 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 26419
|
||||||
|
* elf-m10300.c (mn10300_elf_relax_section): Don't attempt access
|
||||||
|
before start of section.
|
||||||
|
|
||||||
2020-08-25 Alan Modra <amodra@gmail.com>
|
2020-08-25 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* elf-m10300.c (elf32_mn10300_hash_table): Test is_elf_hash_table
|
* elf-m10300.c (elf32_mn10300_hash_table): Test is_elf_hash_table
|
||||||
|
@ -3932,7 +3932,7 @@ mn10300_elf_relax_section (bfd *abfd,
|
|||||||
/* See if the value will fit in 24 bits.
|
/* See if the value will fit in 24 bits.
|
||||||
We allow any 16bit match here. We prune those we can't
|
We allow any 16bit match here. We prune those we can't
|
||||||
handle below. */
|
handle below. */
|
||||||
if ((long) value < 0x7fffff && (long) value > -0x800000)
|
if (value + 0x800000 < 0x1000000 && irel->r_offset >= 3)
|
||||||
{
|
{
|
||||||
unsigned char code;
|
unsigned char code;
|
||||||
|
|
||||||
@ -4003,7 +4003,7 @@ mn10300_elf_relax_section (bfd *abfd,
|
|||||||
/* See if the value will fit in 16 bits.
|
/* See if the value will fit in 16 bits.
|
||||||
We allow any 16bit match here. We prune those we can't
|
We allow any 16bit match here. We prune those we can't
|
||||||
handle below. */
|
handle below. */
|
||||||
if ((long) value < 0x7fff && (long) value > -0x8000)
|
if (value + 0x8000 < 0x10000 && irel->r_offset >= 2)
|
||||||
{
|
{
|
||||||
unsigned char code;
|
unsigned char code;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user