mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-29 23:12:55 +01:00
34f7950ebf
* Section association cannot use just the section name as many sections can have the same name. With this patch, the comdat symbol in an assoc section is interpreted to mean a symbol in the associated section and the mapping is discovered from it. * Comdat symbols were not being set correctly. Instead we were getting whatever was output first for that section. A consequence is that associative sections now must use .section to set the association. Using .linkonce would not work since it is not possible to change a sections comdat symbol (it is used to decide if we should create a new section or reuse an existing one). This includes r210298, which was reverted because it was asserting on an associated section having the same comdat as the associated section. llvm-svn: 210367
29 lines
585 B
ArmAsm
29 lines
585 B
ArmAsm
// Test invalid use of the .linkonce directive.
|
|
//
|
|
// RUN: not llvm-mc -triple i386-pc-win32 -filetype=obj %s 2>&1 | FileCheck %s
|
|
|
|
.section non_comdat
|
|
|
|
.section comdat
|
|
.linkonce discard
|
|
|
|
.section assoc
|
|
.linkonce associative comdat
|
|
|
|
|
|
.section invalid
|
|
|
|
// CHECK: error: unrecognized COMDAT type 'unknown'
|
|
.linkonce unknown
|
|
|
|
// CHECK: error: unexpected token in directive
|
|
.linkonce discard foo
|
|
|
|
// CHECK: error: cannot make section associative with .linkonce
|
|
.linkonce associative
|
|
|
|
// CHECK: error: section 'multi' is already linkonce
|
|
.section multi
|
|
.linkonce discard
|
|
.linkonce same_size
|