summaryrefslogtreecommitdiff
path: root/rtl-rap.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-12-15 22:41:36 +1100
committerChris Johns <chrisj@rtems.org>2012-12-15 22:41:36 +1100
commitf5ccaa7088eab8c9df5e529bf8cd17784cad023a (patch)
treefacb658718687cdec7c83265d9626e1067852ab9 /rtl-rap.c
parent20842112b7c8604644c737bac058b4b06374793c (diff)
The symbol is the section base and addend. Add some more debugging.
Diffstat (limited to 'rtl-rap.c')
-rw-r--r--rtl-rap.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/rtl-rap.c b/rtl-rap.c
index bfedbb0..c5de26f 100644
--- a/rtl-rap.c
+++ b/rtl-rap.c
@@ -314,7 +314,7 @@ rtems_rtl_rap_relocate (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
return false;
}
- symvalue = (Elf_Word) symsect->base;
+ symvalue = (Elf_Word) symsect->base + addend;
}
else if (rtems_rtl_elf_rel_resolve_sym (type))
{
@@ -451,6 +451,10 @@ rtems_rtl_rap_load_symbols (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
return false;
}
+ if (rtems_rtl_trace (RTEMS_RTL_TRACE_SYMBOL))
+ printf ("rtl: sym:load: data=0x%08lx name=0x%08lx value=0x%08lx\n",
+ data, name, value);
+
/*
* If there is a globally exported symbol already present and this
* symbol is not weak raise an error. If the symbol is weak and present
@@ -715,22 +719,16 @@ rtems_rtl_rap_file_load (rtems_rtl_obj_t* obj, int fd)
/*
* uint32_t: text_size
* uint32_t: text_alignment
- * uint32_t: text_offset
* uint32_t: const_size
* uint32_t: const_alignment
- * uint32_t: const_offset
* uint32_t: ctor_size
* uint32_t: ctor_alignment
- * uint32_t: ctor_offset
* uint32_t: dtor_size
* uint32_t: dtor_alignment
- * uint32_t: dtor_offset
* uint32_t: data_size
* uint32_t: data_alignment
- * uint32_t: data_offset
* uint32_t: bss_size
* uint32_t: bss_alignment
- * uint32_t: bss_offset
*/
for (section = 0; section < RTEMS_RTL_RAP_SECS; ++section)