Lines 3198-3208
_bfd_nearby_section (bfd *obfd, asection *s, bfd_vma addr)
Link Here
|
3198 |
best = prev; |
3198 |
best = prev; |
3199 |
} |
3199 |
} |
3200 |
|
3200 |
|
3201 |
/* Refuse to choose a section for which we are out of bounds. */ |
|
|
3202 |
/* ??? This may make most of the above moot. */ |
3203 |
if (addr < best->vma || addr > best->vma + best->size) |
3204 |
best = bfd_abs_section_ptr; |
3205 |
|
3206 |
return best; |
3201 |
return best; |
3207 |
} |
3202 |
} |
3208 |
|
3203 |
|
Lines 3240-3245
_bfd_fix_excluded_sec_syms (bfd *obfd, struct bfd_link_info *info)
Link Here
|
3240 |
bfd_link_hash_traverse (info->hash, fix_syms, obfd); |
3235 |
bfd_link_hash_traverse (info->hash, fix_syms, obfd); |
3241 |
} |
3236 |
} |
3242 |
|
3237 |
|
|
|
3238 |
/* Keep sections with symbols. */ |
3239 |
|
3240 |
static bfd_boolean |
3241 |
keep_sections_with_sym (struct bfd_link_hash_entry *h, void *data) |
3242 |
{ |
3243 |
bfd *obfd = (bfd *) data; |
3244 |
|
3245 |
if (h->type == bfd_link_hash_defined |
3246 |
|| h->type == bfd_link_hash_defweak) |
3247 |
{ |
3248 |
asection *s = h->u.def.section; |
3249 |
if (s != NULL |
3250 |
&& (s->flags |
3251 |
& (SEC_LINKER_CREATED | SEC_EXCLUDE | SEC_KEEP)) == 0 |
3252 |
&& s->output_section != NULL |
3253 |
&& (s->output_section->flags |
3254 |
& (SEC_LINKER_CREATED | SEC_EXCLUDE | SEC_KEEP)) == 0 |
3255 |
&& !bfd_section_removed_from_list (obfd, s->output_section)) |
3256 |
s->output_section->flags |= SEC_KEEP; |
3257 |
} |
3258 |
|
3259 |
return TRUE; |
3260 |
} |
3261 |
|
3262 |
void |
3263 |
_bfd_keep_sections_with_sym (bfd *obfd, struct bfd_link_info *info) |
3264 |
{ |
3265 |
bfd_link_hash_traverse (info->hash, keep_sections_with_sym, obfd); |
3266 |
} |
3267 |
|
3243 |
/* |
3268 |
/* |
3244 |
FUNCTION |
3269 |
FUNCTION |
3245 |
bfd_generic_define_common_symbol |
3270 |
bfd_generic_define_common_symbol |