diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-11-06 00:17:48 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-11-06 00:17:48 +0000 |
commit | df616ea88af8d577b0b20d7d09302f3255ed0063 (patch) | |
tree | ef4d1724e67d25d27acdb31ac2c03d04280d2be9 /ldso | |
parent | fe40d72e6a71e2493a444c68b9cd6eec3be61ce4 (diff) |
Do not set the RELOCS_DONE flag until it is actually done. This order matters for NPTL libpthreads to work. Well, that was a nice waste of 3 hours.
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/ldso/dl-elf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c index 6c9a1fd44..d7fd41edd 100644 --- a/ldso/ldso/dl-elf.c +++ b/ldso/ldso/dl-elf.c @@ -654,7 +654,6 @@ int _dl_fixup(struct dyn_elf *rpnt, int now_flag) #endif if (tpnt->dynamic_info[DT_RELOC_TABLE_ADDR] && !(tpnt->init_flag & RELOCS_DONE)) { - tpnt->init_flag |= RELOCS_DONE; reloc_addr = tpnt->dynamic_info[DT_RELOC_TABLE_ADDR]; relative_count = tpnt->dynamic_info[DT_RELCONT_IDX]; if (relative_count) { /* Optimize the XX_RELATIVE relocations if possible */ @@ -665,6 +664,7 @@ int _dl_fixup(struct dyn_elf *rpnt, int now_flag) goof += _dl_parse_relocation_information(rpnt, reloc_addr, reloc_size); + tpnt->init_flag |= RELOCS_DONE; } if (tpnt->dynamic_info[DT_BIND_NOW]) now_flag = RTLD_NOW; @@ -672,7 +672,6 @@ int _dl_fixup(struct dyn_elf *rpnt, int now_flag) (!(tpnt->init_flag & JMP_RELOCS_DONE) || (now_flag && !(tpnt->rtld_flags & now_flag)))) { tpnt->rtld_flags |= now_flag; - tpnt->init_flag |= JMP_RELOCS_DONE; if (!(tpnt->rtld_flags & RTLD_NOW)) { _dl_parse_lazy_relocation_information(rpnt, tpnt->dynamic_info[DT_JMPREL], @@ -682,6 +681,7 @@ int _dl_fixup(struct dyn_elf *rpnt, int now_flag) tpnt->dynamic_info[DT_JMPREL], tpnt->dynamic_info[DT_PLTRELSZ]); } + tpnt->init_flag |= JMP_RELOCS_DONE; } return goof; } |