[uClibc-cvs] uClibc/ldso/ldso/frv dl-startup.h, 1.1, 1.2 dl-sysdep.h, 1.1, 1.2
Erik Andersen
andersen at uclibc.org
Wed Feb 18 08:12:32 UTC 2004
- Previous message: [uClibc-cvs] uClibc/libc/sysdeps/linux/frv/sys procfs.h, NONE, 1.1 ptrace.h, NONE, 1.1 ucontext.h, NONE, 1.1
- Next message: [uClibc-cvs] uClibc/libc/sysdeps/linux/frv mmap.c, NONE, 1.1 Makefile, 1.1, 1.2 _mmap.c, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/uClibc/ldso/ldso/frv
In directory nail:/tmp/cvs-serv7871
Modified Files:
dl-startup.h dl-sysdep.h
Log Message:
Minor change to better match recent changes to other arches
Index: dl-sysdep.h
===================================================================
RCS file: /var/cvs/uClibc/ldso/ldso/frv/dl-sysdep.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- dl-sysdep.h 18 Feb 2004 08:04:49 -0000 1.1
+++ dl-sysdep.h 18 Feb 2004 08:12:30 -0000 1.2
@@ -30,24 +30,6 @@
#undef ELF_USES_RELOCA
/*
- * Get a pointer to the argv array. On many platforms this can be just
- * the address if the first argument, on other platforms we need to
- * do something a little more subtle here.
- */
-#define GET_ARGV(ARGVP, ARGS) ARGVP = ((unsigned long*) ARGS)
-
-/*
- * Compute the GOT address. On several platforms, we use assembly
- * here. on FR-V FDPIC, there's no way to compute the GOT address,
- * since the offset between text and data is not fixed, so we arrange
- * for the assembly _dl_boot to pass this value as an argument to
- * _dl_boot. */
-#define DL_BOOT_COMPUTE_GOT(got) ((got) = dl_boot_got_pointer)
-
-#define DL_BOOT_COMPUTE_DYN(dpnt, got, load_addr) \
- ((dpnt) = dl_boot_ldso_dyn_pointer)
-
-/*
* Initialization sequence for a GOT. Copy the resolver function
* descriptor and the pointer to the elf_resolve/link_map data
* structure. Initialize the got_value in the module while at that.
@@ -60,52 +42,10 @@
GOT_BASE[2] = (unsigned long) MODULE; \
}
-/*
- * Here is a macro to perform a relocation. This is only used when
- * bootstrapping the dynamic loader. RELP is the relocation that we
- * are performing, REL is the pointer to the address we are relocating.
- * SYMBOL is the symbol involved in the relocation, and LOAD is the
- * load address.
- */
-#define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD,SYMTAB) \
- switch(ELF32_R_TYPE((RELP)->r_info)){ \
- case R_FRV_32: \
- *(REL) += (SYMBOL); \
- break; \
- case R_FRV_FUNCDESC_VALUE: \
- { \
- struct funcdesc_value fv = { \
- (void*)((SYMBOL) + *(REL)), \
- (LOAD).got_value \
- }; \
- *(struct funcdesc_value volatile *)(REL) = fv; \
- break; \
- } \
- default: \
- _dl_exit(1); \
- }
-
-/*
- * 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; \
- /* _dl_dprintf(2, "entry point is (%x,%x)\n", dl_main_funcdesc->entry_point, dl_main_funcdesc->got_value); */ \
- return; \
-} while (0)
-
-
-
/* Here we define the magic numbers that this dynamic loader should accept */
-
#define MAGIC1 EM_CYGNUS_FRV
#undef MAGIC2
+
/* Used for error messages */
#define ELF_TARGET "FR-V"
Index: dl-startup.h
===================================================================
RCS file: /var/cvs/uClibc/ldso/ldso/frv/dl-startup.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- dl-startup.h 18 Feb 2004 08:04:49 -0000 1.1
+++ dl-startup.h 18 Feb 2004 08:12:30 -0000 1.2
@@ -87,3 +87,65 @@
X)
struct elf32_fdpic_loadmap;
+
+/*
+ * Get a pointer to the argv array. On many platforms this can be just
+ * the address if the first argument, on other platforms we need to
+ * do something a little more subtle here.
+ */
+#define GET_ARGV(ARGVP, ARGS) ARGVP = ((unsigned long*) ARGS)
+
+/*
+ * Compute the GOT address. On several platforms, we use assembly
+ * here. on FR-V FDPIC, there's no way to compute the GOT address,
+ * since the offset between text and data is not fixed, so we arrange
+ * for the assembly _dl_boot to pass this value as an argument to
+ * _dl_boot. */
+#define DL_BOOT_COMPUTE_GOT(got) ((got) = dl_boot_got_pointer)
+
+#define DL_BOOT_COMPUTE_DYN(dpnt, got, load_addr) \
+ ((dpnt) = dl_boot_ldso_dyn_pointer)
+
+/*
+ * Here is a macro to perform a relocation. This is only used when
+ * bootstrapping the dynamic loader. RELP is the relocation that we
+ * are performing, REL is the pointer to the address we are relocating.
+ * SYMBOL is the symbol involved in the relocation, and LOAD is the
+ * load address.
+ */
+#define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD,SYMTAB) \
+ switch(ELF32_R_TYPE((RELP)->r_info)){ \
+ case R_FRV_32: \
+ *(REL) += (SYMBOL); \
+ break; \
+ case R_FRV_FUNCDESC_VALUE: \
+ { \
+ struct funcdesc_value fv = { \
+ (void*)((SYMBOL) + *(REL)), \
+ (LOAD).got_value \
+ }; \
+ *(struct funcdesc_value volatile *)(REL) = fv; \
+ break; \
+ } \
+ default: \
+ _dl_exit(1); \
+ }
+
+/*
+ * 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; \
+ /* _dl_dprintf(2, "entry point is (%x,%x)\n", dl_main_funcdesc->entry_point, dl_main_funcdesc->got_value); */ \
+ return; \
+} while (0)
+
+
+
+
- Previous message: [uClibc-cvs] uClibc/libc/sysdeps/linux/frv/sys procfs.h, NONE, 1.1 ptrace.h, NONE, 1.1 ucontext.h, NONE, 1.1
- Next message: [uClibc-cvs] uClibc/libc/sysdeps/linux/frv mmap.c, NONE, 1.1 Makefile, 1.1, 1.2 _mmap.c, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the uClibc-cvs
mailing list