diff --git a/cpukit/libdl/rtl-mdreloc-sparc.c b/cpukit/libdl/rtl-mdreloc-sparc.c
index a8bf5e1..b5c6b2c 100644
a
|
b
|
rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj, |
218 | 218 | value >>= RELOC_VALUE_RIGHTSHIFT (type); |
219 | 219 | value &= mask; |
220 | 220 | |
221 | | if (RELOC_UNALIGNED(type)) { |
| 221 | if (RELOC_UNALIGNED(type) || ((((intptr_t) where) & 3) != 0)) { |
222 | 222 | /* Handle unaligned relocations. */ |
223 | 223 | Elf_Addr tmp = 0; |
224 | 224 | char *ptr = (char *)where; |
… |
… |
rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj, |
235 | 235 | for (i=0; i<size; i++) |
236 | 236 | ptr[i] = ((tmp >> (8*i)) & 0xff); |
237 | 237 | |
| 238 | if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) { |
| 239 | ptr = (char*)&value; |
| 240 | for (i=0; i<size; i++) |
| 241 | ptr[i] = ((tmp >> (8*i)) & 0xff); |
| 242 | } |
| 243 | |
238 | 244 | } else { |
239 | 245 | *where &= ~mask; |
240 | 246 | *where |= value; |
| 247 | if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) |
| 248 | value = *where; |
241 | 249 | } |
242 | 250 | |
243 | 251 | if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) |
244 | 252 | printf ("rtl: %s %p @ %p in %s\n", |
245 | | reloc_names[type], (void *)*where, where, rtems_rtl_obj_oname (obj)); |
246 | | |
| 253 | reloc_names[type], (void *)value, where, rtems_rtl_obj_oname (obj)); |
247 | 254 | |
248 | 255 | return true; |
249 | 256 | } |