mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Support multiple COFF sections with the same name but different COMDAT.
This is the first step to fix pr17918. It extends the .section directive a bit, inspired by what the ELF one looks like. The problem with using linkonce is that given .section foo .linkonce.... .section foo .linkonce we would already have switched sections when getting to .linkonce. The cleanest solution seems to be to add the comdat information in the .section itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195148 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -733,6 +733,7 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
return getContext().getCOFFSection(Name,
|
||||
Characteristics,
|
||||
Kind,
|
||||
"",
|
||||
Selection);
|
||||
}
|
||||
|
||||
@ -768,7 +769,7 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
Characteristics |= COFF::IMAGE_SCN_LNK_COMDAT;
|
||||
|
||||
return getContext().getCOFFSection(Name.str(), Characteristics,
|
||||
Kind, COFF::IMAGE_COMDAT_SELECT_ANY);
|
||||
Kind, "", COFF::IMAGE_COMDAT_SELECT_ANY);
|
||||
}
|
||||
|
||||
if (Kind.isText())
|
||||
|
Reference in New Issue
Block a user