summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-07-11 22:29:29 +0000
committerMike Frysinger <vapier@gentoo.org>2005-07-11 22:29:29 +0000
commit8174ddee1c42b33bce02ab5846fdcaf205d916d7 (patch)
treed3b4b2dd51155c237a6c003531ae3c2e4465f1f7
parent2b6789581c5d1d556ba7c0e4719b4bf5d6f035bf (diff)
use the debug dprint macros to clean up readability
-rw-r--r--ldso/ldso/dl-elf.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
index a55429615..2bb6ae575 100644
--- a/ldso/ldso/dl-elf.c
+++ b/ldso/ldso/dl-elf.c
@@ -122,10 +122,7 @@ _dl_protect_relro (struct elf_resolve *l)
& ~(_dl_pagesize - 1));
ElfW(Addr) end = ((l->loadaddr + l->relro_addr + l->relro_size)
& ~(_dl_pagesize - 1));
-#if defined (__SUPPORT_LD_DEBUG__)
- if (_dl_debug)
- _dl_dprintf(2, "RELRO protecting %s: start:%x, end:%x\n", l->libname, start, end);
-#endif
+ _dl_if_debug_dprint("RELRO protecting %s: start:%x, end:%x\n", l->libname, start, end);
if (start != end &&
_dl_mprotect ((void *) start, end - start, PROT_READ) < 0) {
_dl_dprintf(2, "%s: cannot apply additional memory protection after relocation", l->libname);
@@ -716,6 +713,7 @@ struct elf_resolve *_dl_load_elf_shared_library(int secure,
return tpnt;
}
+
/* now_flag must be RTLD_NOW or zero */
int _dl_fixup(struct dyn_elf *rpnt, int now_flag)
{
@@ -728,10 +726,8 @@ int _dl_fixup(struct dyn_elf *rpnt, int now_flag)
goof += _dl_fixup(rpnt->next, now_flag);
tpnt = rpnt->dyn;
-#if defined (__SUPPORT_LD_DEBUG__)
if(!(tpnt->init_flag & RELOCS_DONE))
- _dl_if_debug_dprint("\nrelocation processing: %s\n", tpnt->libname);
-#endif
+ _dl_if_debug_dprint("relocation processing: %s\n", tpnt->libname);
if (unlikely(tpnt->dynamic_info[UNSUPPORTED_RELOC_TYPE])) {
_dl_if_debug_dprint("%s: can't handle %s relocation records\n",
@@ -753,7 +749,7 @@ int _dl_fixup(struct dyn_elf *rpnt, int now_flag)
relative_count = tpnt->dynamic_info[DT_RELCONT_IDX];
if (relative_count) { /* Optimize the XX_RELATIVE relocations if possible */
reloc_size -= relative_count * sizeof(ELF_RELOC);
- elf_machine_relative (tpnt->loadaddr, reloc_addr, relative_count);
+ elf_machine_relative(tpnt->loadaddr, reloc_addr, relative_count);
reloc_addr += relative_count * sizeof(ELF_RELOC);
}
goof += _dl_parse_relocation_information(rpnt,