If the destination module all ready has a copy of the global coming from the
authorBill Wendling <isanbard@gmail.com>
Wed, 6 Oct 2010 06:16:30 +0000 (06:16 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 6 Oct 2010 06:16:30 +0000 (06:16 +0000)
commit7f5124829ffcf75f598b024ec40cc83753eb72d4
treeb55d566b7190e5e3707d676b062a40108b8826e2
parentb2fc4098275a27712089a9675bb45447ae373032
If the destination module all ready has a copy of the global coming from the
source module *and* it must be merged (instead of simply replaced or appended
to), then merge instead of replacing or adding another global.

The ObjC __image_info section was being appended to because of this
failure. This caused a crash because the linker expects the image info section
to be a specific size.

<rdar://problem/8198537>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115753 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp