* [PATCH] arc: Don't generate dynamic relocation for non SEC_ALLOC sections
@ 2020-06-02 19:46 H.J. Lu
2020-06-03 15:59 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2020-06-02 19:46 UTC (permalink / raw)
To: binutils
Don't generate dynamic relocations for non SEC_ALLOC sections because
run-time loader won't process them.
* elf32-arc.c (elf_arc_relocate_section): Don't generate dynamic
relocations for non SEC_ALLOC sections.
---
bfd/elf32-arc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 774d3e793d..06ee60ac40 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -1782,6 +1782,7 @@ elf_arc_relocate_section (bfd * output_bfd,
case R_ARC_PC32:
case R_ARC_32_PCREL:
if (bfd_link_pic (info)
+ && (input_section->flags & SEC_ALLOC) != 0
&& (!IS_ARC_PCREL_TYPE (r_type)
|| (h != NULL
&& h->dynindx != -1
--
2.26.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] arc: Don't generate dynamic relocation for non SEC_ALLOC sections
2020-06-02 19:46 [PATCH] arc: Don't generate dynamic relocation for non SEC_ALLOC sections H.J. Lu
@ 2020-06-03 15:59 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2020-06-03 15:59 UTC (permalink / raw)
To: H.J. Lu, binutils
Hi H.J.
> * elf32-arc.c (elf_arc_relocate_section): Don't generate dynamic
> relocations for non SEC_ALLOC sections.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-03 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02 19:46 [PATCH] arc: Don't generate dynamic relocation for non SEC_ALLOC sections H.J. Lu
2020-06-03 15:59 ` 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).