[PATCH 1/4] Add support for R_ARC_NONE relocations.

Vineet Gupta <[email protected]>
Newsgroups gmane.comp.lib.uclibc.general
Message-ID <[email protected]>
From: Andrew Burgess <[email protected]>

The R_ARC_NONE relocation is generated when --gc-sections, used by the
compile time linker, removes some sections.  This is completely normal,
and we can see that all other targets (based on random sampling) have
support for R_*_NONE relocations (named for each target).

Handling R_ARC_NONE involves doing nothing with it, which is nice and
easy.

Signed-off-by: Vineet Gupta <[email protected]>
---
 ldso/ldso/arc/elfinterp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ldso/ldso/arc/elfinterp.c b/ldso/ldso/arc/elfinterp.c
index 7c31d3ac78f1..2f0cf7f6635b 100644
--- a/ldso/ldso/arc/elfinterp.c
+++ b/ldso/ldso/arc/elfinterp.c
@@ -144,6 +144,8 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
 #endif
 
 	switch (reloc_type) {
+	case R_ARC_NONE:
+		break;
 	case R_ARC_32:
 		*reloc_addr += symbol_addr + rpnt->r_addend;
 		break;
@@ -202,6 +204,8 @@ _dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
 #endif
 
 	switch (reloc_type) {
+	case R_ARC_NONE:
+		break;
 	case R_ARC_JMP_SLOT:
 		*reloc_addr += tpnt->loadaddr;
 		break;
-- 
1.9.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.