Relocation type R_ARM_V4BX requires no computation.
It marks the location of an ARMv4 branch exchange instruction.

Signed-off-by: Heinrich Schuchardt <[email protected]>
---
When using elf2efi.c in a separate project I happened to stumble
over this relocation type.

I would prefer if the change could be integrated into ipxe to have
one source for elf2efi.c
---
 src/util/elf2efi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c
index a0f3c67c..37989631 100644
--- a/src/util/elf2efi.c
+++ b/src/util/elf2efi.c
@@ -645,6 +645,9 @@ static void process_reloc ( struct elf_file *elf, const 
Elf_Shdr *shdr,
                         * loaded.
                         */
                        break;
+               case ELF_MREL(EM_ARM, R_ARM_V4BX):
+                       /* Skip instructions without computation */
+                       break;
                default:
                        eprintf ( "Unrecognised relocation type %d\n", type );
                        exit ( 1 );
-- 
2.11.0

_______________________________________________
ipxe-devel mailing list
[email protected]
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

Reply via email to