&& VALID_ELF_OSABI (hdr[EI_OSABI]) \
&& VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
+#define CLEAR_CACHE(BEG,END) \
+{ \
+ register unsigned long _beg __asm ("a1") = (unsigned long)(BEG); \
+ register unsigned long _end __asm ("a2") = (unsigned long)(END); \
+ register unsigned long _flg __asm ("a3") = 0; \
+ __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
+ : /* no outputs */ \
+ : /* no inputs */ \
+ : "a1"); \
+}
+
/* Return nonzero iff E_MACHINE is compatible with the running host. */
static inline int __attribute__ ((unused))
elf_machine_matches_host (Elf32_Half e_machine)
static inline void __attribute__ ((unused))
dl_platform_init (void)
{
- if (_dl_platform == NULL)
- /* We default to ARM
- This is where processors could be distinguished arm2, arm6, sa110, etc */
- _dl_platform = "ARM";
+ if (_dl_platform != NULL && *_dl_platform == '\0')
+ /* Avoid an empty string which would disturb us. */
+ _dl_platform = NULL;
}
static inline void
*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;