Fun with the dynamic loader.

Bernd Schmidt bernds_cb1 at t-online.de
Fri Nov 14 13:31:02 UTC 2008


Rob Landley wrote:
> On Thursday 13 November 2008 21:14:39 Rob Landley wrote:
>> Only three architectures actually #define this macro: frv, bfin, and avr32.
> 
> And while we're at it: frv and bfin define START() to do exactly the same 
> thing.  Does anybody know why it's doing this and why the calling code hasn't 
> just got an if() case for whatever it is?

Uhhh???  This is from bfin/dl-startup.h:

/*
 * Transfer control to the user's application, once the dynamic loader
 * is done.  We return the address of the function's entry point to
 * _dl_boot, see boot1_arch.h.
 */
#define START() do {                                                    \
  struct elf_resolve *exec_mod = _dl_loaded_modules;                    \
  dl_main_funcdesc->entry_point = _dl_elf_main;                         \
  while (exec_mod->libtype != elf_executable)                           \
    exec_mod = exec_mod->next;                                          \
  dl_main_funcdesc->got_value = exec_mod->loadaddr.got_value;           \
  return;                                                               \
} while (0)


Bernd
-- 
This footer brought to you by insane German lawmakers.
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif



More information about the uClibc mailing list