Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ld.elf_so/arch/hppa Wrap long lines
details: https://anonhg.NetBSD.org/src/rev/0b95f0ba2172
branches: trunk
changeset: 757803:0b95f0ba2172
user: skrll <skrll%NetBSD.org@localhost>
date: Fri Sep 24 11:41:46 2010 +0000
description:
Wrap long lines
Reformat comments.
diffstat:
libexec/ld.elf_so/arch/hppa/hppa_reloc.c | 23 ++++---
libexec/ld.elf_so/arch/hppa/rtld_start.S | 93 +++++++++++++++----------------
2 files changed, 56 insertions(+), 60 deletions(-)
diffs (240 lines):
diff -r 53fce467d7ea -r 0b95f0ba2172 libexec/ld.elf_so/arch/hppa/hppa_reloc.c
--- a/libexec/ld.elf_so/arch/hppa/hppa_reloc.c Fri Sep 24 09:21:53 2010 +0000
+++ b/libexec/ld.elf_so/arch/hppa/hppa_reloc.c Fri Sep 24 11:41:46 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hppa_reloc.c,v 1.33 2010/08/06 16:33:17 joerg Exp $ */
+/* $NetBSD: hppa_reloc.c,v 1.34 2010/09/24 11:41:46 skrll Exp $ */
/*-
* Copyright (c) 2002, 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hppa_reloc.c,v 1.33 2010/08/06 16:33:17 joerg Exp $");
+__RCSID("$NetBSD: hppa_reloc.c,v 1.34 2010/09/24 11:41:46 skrll Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -83,12 +83,10 @@
}
/*
- * In the runtime architecture (ABI), PLABEL function
- * pointers are distinguished from normal function
- * pointers by having the next-least-significant bit
- * set. (This bit is referred to as the L field in
- * HP documentation). The $$dyncall millicode is
- * aware of this.
+ * In the runtime architecture (ABI), PLABEL function pointers are
+ * distinguished from normal function pointers by having the next-least-
+ * significant bit set. (This bit is referred to as the L field in HP
+ * documentation). The $$dyncall millicode is aware of this.
*/
#define RTLD_MAKE_PLABEL(plabel) (((Elf_Addr)(plabel)) | (1 << 1))
#define RTLD_IS_PLABEL(addr) (((Elf_Addr)(addr)) & (1 << 1))
@@ -401,7 +399,8 @@
store_ptr(where, tmp);
rdbg(("DIR32 %s in %s --> %p in %s",
obj->strtab + obj->symtab[symnum].st_name,
- obj->path, (void *)load_ptr(where), defobj->path));
+ obj->path, (void *)load_ptr(where),
+ defobj->path));
} else {
tmp = (Elf_Addr)(obj->relocbase +
rela->r_addend);
@@ -542,7 +541,8 @@
}
static inline int
-_rtld_relocate_plt_object(const Obj_Entry *obj, const Elf_Rela *rela, Elf_Addr *tp)
+_rtld_relocate_plt_object(const Obj_Entry *obj, const Elf_Rela *rela,
+ Elf_Addr *tp)
{
Elf_Word *where = (Elf_Word *)(obj->relocbase + rela->r_offset);
const Elf_Sym *def;
@@ -563,7 +563,8 @@
if (__predict_false(def == &_rtld_sym_zero))
return 0;
- func_pc = (Elf_Addr)(defobj->relocbase + def->st_value + rela->r_addend);
+ func_pc = (Elf_Addr)(defobj->relocbase + def->st_value +
+ rela->r_addend);
func_sl = (Elf_Addr)(defobj->pltgot);
rdbg(("bind now/fixup in %s --> old=(%p,%p) new=(%p,%p)",
diff -r 53fce467d7ea -r 0b95f0ba2172 libexec/ld.elf_so/arch/hppa/rtld_start.S
--- a/libexec/ld.elf_so/arch/hppa/rtld_start.S Fri Sep 24 09:21:53 2010 +0000
+++ b/libexec/ld.elf_so/arch/hppa/rtld_start.S Fri Sep 24 11:41:46 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld_start.S,v 1.7 2010/01/09 15:36:43 skrll Exp $ */
+/* $NetBSD: rtld_start.S,v 1.8 2010/09/24 11:41:46 skrll Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -42,9 +42,9 @@
stw,ma %r1, HPPA_FRAME_SIZE(%sp)
/*
- * Save our single argument, the ps_strings pointer.
- * We'll need this twice later: once to call _rtld,
- * and again to transfer to the program's entry point.
+ * Save our single argument, the ps_strings pointer. We'll need this
+ * twice later: once to call _rtld, and again to transfer to the
+ * program's entry point.
*/
stw %arg0, HPPA_FRAME_ARG(0)(%r3)
@@ -61,19 +61,17 @@
ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%arg0
/*
- * Load the absolute address of the beginning of the
- * GOT into %r19, the shared library linkage table
- * register, leaving it ready-to-use by the dynamic
- * linker C code.
+ * Load the absolute address of the beginning of the GOT into %r19, the
+ * shared library linkage table register, leaving it ready-to-use by
+ * the dynamic linker C code.
*/
addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16), %r19
ldo R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r19
/*
- * The linker sets the first entry in the GOT to the
- * unrelocated address of _DYNAMIC. Subtract this
- * from the absolute address of _DYNAMIC to get our
- * relocbase.
+ * The linker sets the first entry in the GOT to the unrelocated
+ * address of _DYNAMIC. Subtract this from the absolute address of
+ * _DYNAMIC to get our relocbase.
*/
ldw 0(%r19), %arg1
sub %arg0, %arg1, %arg1 ; %arg1 = relocbase
@@ -87,12 +85,11 @@
ldw HPPA_FRAME_ARG(0)(%r3), %arg0 ; ps_strings
ldw 0(%arg0), %arg0 ; ps_argvstr member first in struct
- /*
- * ps_argvstr - 4 would get us a pointer to argc,
- * comparable to the initial stack pointer on
- * architectures where the stack grows down.
- * Subtracting an additional eight creates the
- * storage for obj and cleanup that _rtld needs.
+ /*
+ * ps_argvstr - 4 would get us a pointer to argc, comparable to the
+ * initial stack pointer on architectures where the stack grows down.
+ * Subtracting an additional eight creates the storage for obj and
+ * cleanup that _rtld needs.
*/
ldo -12(%arg0), %arg0
stw %arg0, HPPA_FRAME_ARG(1)(%r3)
@@ -117,22 +114,20 @@
EXIT($rtld_start)
/*
- * This does our setup for an object's GOT. %arg0 is the
- * Obj_Entry * for the object, and %arg1 is its GOT pointer.
+ * This does our setup for an object's GOT. %arg0 is the Obj_Entry * for the
+ * object, and %arg1 is its GOT pointer.
*/
LEAF_ENTRY(__rtld_setup_hppa_pltgot)
/*
- * The second entry of the GOT is reserved for
- * the dynamic linker. We put the Obj_Entry *
- * for the object in there.
+ * The second entry of the GOT is reserved for the dynamic linker. We
+ * put the Obj_Entry * for the object in there.
*/
stw %arg0, 4(%arg1)
/*
- * Fill the fixup_func and fixup_ltp members of
- * the PLT stub. This stub is inserted by the
- * linker immediately before the GOT. We use
+ * Fill the fixup_func and fixup_ltp members of the PLT stub. This
+ * stub is inserted by the linker immediately before the GOT. We use
* this stub to enter our binder.
*/
@@ -147,9 +142,9 @@
EXIT(__rtld_hppa_setup_pltgot)
/*
- * In order to support lazy binding, this implementation of
- * _rtld_bind_start is very closely tied to the shared-library
- * call stub and the PLT stub, both inserted by the linker.
+ * In order to support lazy binding, this implementation of _rtld_bind_start is
+ * very closely tied to the shared-library call stub and the PLT stub, both
+ * inserted by the linker.
*/
ENTRY(_rtld_bind_start,HPPA_FRAME_SIZE)
@@ -160,11 +155,14 @@
stw,ma %r1, HPPA_FRAME_SIZE(%sp)
/*
- * We have to save all calling convention registers
- * that are set by the caller, because we have to
- * restore them before transferring to the bound
- * function. Note that this includes %ret0 and %ret1,
- * because they can have meaning on entry to a function.
+ * We have to save all calling convention registers that are set by the
+ * caller, because we have to restore them before transferring to the
+ * bound function. Note that this includes %ret0, %ret1, and %t1.
+ *
+ * %ret0 and %ret1 because they can have meaning on entry to a
+ * function.
+ *
+ * %t1 because it's used by libc to pass on errno values to cerror.
*/
stw %rp, HPPA_FRAME_CRP(%r3)
stw %arg0, HPPA_FRAME_ARG(0)(%r3)
@@ -176,34 +174,31 @@
stw %ret1, 8(%r3)
/*
- * The linker PLT stub loads %r20 with (GOT - 8) for
- * the object that needs binding done. The second entry
- * of the GOT is reserved for the dynamic linker's use,
- * and we previously stashed the object's Obj_Entry *
- * there.
+ * The linker PLT stub loads %r20 with (GOT - 8) for the object that
+ * needs binding done. The second entry of the GOT is reserved for the
+ * dynamic linker's use, and we previously stashed the object's
+ * Obj_Entry * there.
*/
ldw 12(%r20), %arg0
/*
- * The linker shared-library call stub loads %r19 from
- * the shared linkage member of the PLT entry. We
- * previously stashed the reloff of the relocation there.
+ * The linker shared-library call stub loads %r19 from the shared
+ * linkage member of the PLT entry. We previously stashed the reloff
+ * of the relocation there.
*/
copy %r19, %arg1
/*
- * The linker PLT stub loads %r21 with the fixup_ltp
- * word in itself. We previously stashed our %r19
- * value there.
+ * The linker PLT stub loads %r21 with the fixup_ltp word in itself.
+ * We previously stashed our %r19 value there.
*/
bl _rtld_bind, %rp
copy %r21, %r19
/*
- * Our hppa version of _rtld_bind returns to us the
- * address of the PLT entry that it fixed up. Load
- * the function address and shared linkage for the
- * newly bound function.
+ * Our hppa version of _rtld_bind returns to us the address of the PLT
+ * entry that it fixed up. Load the function address and shared
+ * linkage for the newly bound function.
*/
ldw 0(%ret0), %r21
ldw 4(%ret0), %r19
Home |
Main Index |
Thread Index |
Old Index