/* Fall through. */
case MDEF:
/* Handle a multiple definition. */
- {
- asection *msec = NULL;
- bfd_vma mval = 0;
+ if (!info->allow_multiple_definition)
+ {
+ asection *msec = NULL;
+ bfd_vma mval = 0;
- switch (h->type)
- {
- case bfd_link_hash_defined:
- msec = h->u.def.section;
- mval = h->u.def.value;
- break;
- case bfd_link_hash_indirect:
- msec = bfd_ind_section_ptr;
- mval = 0;
- break;
- default:
- abort ();
- }
+ switch (h->type)
+ {
+ case bfd_link_hash_defined:
+ msec = h->u.def.section;
+ mval = h->u.def.value;
+ break;
+ case bfd_link_hash_indirect:
+ msec = bfd_ind_section_ptr;
+ mval = 0;
+ break;
+ default:
+ abort ();
+ }
- /* Ignore a redefinition of an absolute symbol to the same
- value; it's harmless. */
- if (h->type == bfd_link_hash_defined
- && bfd_is_abs_section (msec)
- && bfd_is_abs_section (section)
- && value == mval)
- break;
+ /* Ignore a redefinition of an absolute symbol to the
+ same value; it's harmless. */
+ if (h->type == bfd_link_hash_defined
+ && bfd_is_abs_section (msec)
+ && bfd_is_abs_section (section)
+ && value == mval)
+ break;
- if (! ((*info->callbacks->multiple_definition)
- (info, h->root.string, msec->owner, msec, mval, abfd,
- section, value)))
- return false;
- }
+ if (! ((*info->callbacks->multiple_definition)
+ (info, h->root.string, msec->owner, msec, mval,
+ abfd, section, value)))
+ return false;
+ }
break;
case CIND: