* [Patch Xtensa] Fix R_XTENSA_NONE relocation offsets
@ 2009-04-01 21:26 Sterling Augustine
2009-04-02 9:02 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Sterling Augustine @ 2009-04-01 21:26 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 430 bytes --]
When the Xtensa version of gas removes a literal, it set the relocation
type to R_XTENSA_NONE and modified the offset in a way that can leave
the relocation offset out of range. This wouldn't matter, and is
invisible everywhere but relocatable links, but is still incorrect.
Sterling
2009-04-01 Sterling Augustine <sterling@jaw.hq.tensilica.com>
* elf32-xtensa.c (relax_property_section): Always set r_offset
to zero.
[-- Attachment #2: removed_lits.patch --]
[-- Type: text/plain, Size: 685 bytes --]
Index: bfd/elf32-xtensa.c
===================================================================
--- bfd/elf32-xtensa.c 24 Feb 2009 22:51:10 -0000 1.113
+++ bfd/elf32-xtensa.c 1 Apr 2009 21:20:08 -0000
@@ -10015,12 +10015,7 @@ relax_property_section (bfd *abfd,
if (remove_this_rel)
{
offset_rel->r_info = ELF32_R_INFO (0, R_XTENSA_NONE);
- /* In case this is the last entry, move the relocation offset
- to the previous entry, if there is one. */
- if (offset_rel->r_offset >= bytes_to_remove)
- offset_rel->r_offset -= bytes_to_remove;
- else
- offset_rel->r_offset = 0;
+ offset_rel->r_offset = 0;
}
if (bytes_to_remove != 0)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Patch Xtensa] Fix R_XTENSA_NONE relocation offsets
2009-04-01 21:26 [Patch Xtensa] Fix R_XTENSA_NONE relocation offsets Sterling Augustine
@ 2009-04-02 9:02 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2009-04-02 9:02 UTC (permalink / raw)
To: Sterling Augustine; +Cc: binutils
Hi Sterling,
> 2009-04-01 Sterling Augustine <sterling@jaw.hq.tensilica.com>
>
> * elf32-xtensa.c (relax_property_section): Always set r_offset
> to zero.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-02 9:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-01 21:26 [Patch Xtensa] Fix R_XTENSA_NONE relocation offsets Sterling Augustine
2009-04-02 9:02 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).