|
5 | 5 |
|
6 | 6 | static int fixup_rela(struct dyld_info *info, Elf32_Rela *rela,
|
7 | 7 | Elf32_Addr (*resolve_import)(const char *),
|
8 |
| - const char **error_out) { |
| 8 | + const char **error_out) |
| 9 | +{ |
9 | 10 | Elf32_Sym *sym = NULL;
|
10 | 11 | if(ELF32_R_SYM(rela->r_info) != 0)
|
11 | 12 | sym = &info->symtab[ELF32_R_SYM(rela->r_info)];
|
@@ -51,7 +52,8 @@ static int fixup_rela(struct dyld_info *info, Elf32_Rela *rela,
|
51 | 52 |
|
52 | 53 | int dyld_load(void *shlib, Elf32_Addr base,
|
53 | 54 | Elf32_Addr (*resolve_import)(const char *),
|
54 |
| - struct dyld_info *info, const char **error_out) { |
| 55 | + struct dyld_info *info, const char **error_out) |
| 56 | +{ |
55 | 57 | Elf32_Ehdr *ehdr = (Elf32_Ehdr *)shlib;
|
56 | 58 |
|
57 | 59 | const unsigned char expected_ident[EI_NIDENT] = {
|
@@ -162,7 +164,8 @@ static unsigned long elf_hash(const unsigned char *name)
|
162 | 164 | return h;
|
163 | 165 | }
|
164 | 166 |
|
165 |
| -void *dyld_lookup(const char *symbol, struct dyld_info *info) { |
| 167 | +void *dyld_lookup(const char *symbol, struct dyld_info *info) |
| 168 | +{ |
166 | 169 | unsigned hash = elf_hash((const unsigned char*) symbol);
|
167 | 170 | unsigned index = info->hash.bucket[hash % info->hash.nbucket];
|
168 | 171 | while(strcmp(&info->strtab[info->symtab[index].st_name], symbol)) {
|
|
0 commit comments