Changes in uspace/lib/c/generic/rtld/symbol.c [ca0e838:da54714] in mainline
- File:
-
- 1 edited
-
uspace/lib/c/generic/rtld/symbol.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/rtld/symbol.c
rca0e838 rda54714 65 65 static elf_symbol_t *def_find_in_module(const char *name, module_t *m) 66 66 { 67 if (m->dyn.hash == NULL) { 68 /* No hash table */ 69 return NULL; 70 } 71 67 72 elf_symbol_t *sym_table; 68 73 elf_symbol_t *s, *sym; 69 74 elf_word nbucket; 70 /* elf_word nchain;*/75 /* elf_word nchain; */ 71 76 elf_word i; 72 77 char *s_name; … … 77 82 sym_table = m->dyn.sym_tab; 78 83 nbucket = m->dyn.hash[0]; 79 /* nchain = m->dyn.hash[1]; XXX Use to check HT range*/84 /* nchain = m->dyn.hash[1]; XXX Use to check HT range */ 80 85 81 86 bucket = elf_hash((unsigned char *)name) % nbucket; … … 135 140 modules_untag(start->rtld); 136 141 137 /* Insert root (the program) into the queue and tag it */ 142 /* 143 * Insert root (the program) into the queue and tag it. 144 * 145 * We disable the dangling-pointer warning because the compiler incorrectly 146 * assumes that we leak local address (queue) to a parent scope (to start 147 * argument). However, we always empty the list so the pointer cannot 148 * actually escape. Probably the compiler can never statically analyze that 149 * correctly. 150 */ 138 151 list_initialize(&queue); 139 152 start->bfs_tag = true; 153 #pragma GCC diagnostic push 154 #if defined(__GNUC__) && (__GNUC__ >= 12) 155 #pragma GCC diagnostic ignored "-Wdangling-pointer" 156 #endif 140 157 list_append(&start->queue_link, &queue); 158 #pragma GCC diagnostic pop 141 159 142 160 /* If the symbol is found, it will be stored in 'sym' */
Note:
See TracChangeset
for help on using the changeset viewer.
