about summary refs log tree commit diff
path: root/sysdeps/arm/dl-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/arm/dl-machine.h')
-rw-r--r--sysdeps/arm/dl-machine.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 25e2f06321..2e6faf5d51 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -443,6 +443,23 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	    *reloc_addr += value;
 	    break;
 	  }
+	case R_ARM_PC24:
+	  {
+	     signed int addend;
+
+	     addend = *reloc_addr & 0x00ffffff;
+	     if (addend & 0x00800000) addend |= 0xff000000;
+
+	     value = value - (unsigned int)reloc_addr + (addend << 2);
+	     if (value & 0xfc000003)
+	       _dl_signal_error (0, map->l_name,
+			  "R_ARM_PC24 relocation out of range");
+	       
+	     value = value >> 2;
+	     value = (*reloc_addr & 0xff000000) | (value & 0x00ffffff);
+	     *reloc_addr = value;
+	  }
+	break;
 	default:
 	  _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0);
 	  break;