| Index: src/IceELFObjectWriter.h
|
| diff --git a/src/IceELFObjectWriter.h b/src/IceELFObjectWriter.h
|
| index 11038455616eab6a33b44ea83a8c67c58fd53bd1..333aa075f9dda987e39f9f9bde60e0e70fc07a71 100644
|
| --- a/src/IceELFObjectWriter.h
|
| +++ b/src/IceELFObjectWriter.h
|
| @@ -30,7 +30,8 @@ namespace Ice {
|
| // sections and write them out. Expected usage:
|
| //
|
| // (1) writeInitialELFHeader (invoke once)
|
| -// (2) writeDataSection (invoke once)
|
| +// (2) writeDataSection (may be invoked multiple times, as long as
|
| +// SectionSuffix is unique)
|
| // (3) writeFunctionCode (must invoke once per function)
|
| // (4) writeConstantPool (must invoke once per pooled primitive type)
|
| // (5) setUndefinedSyms (invoke once)
|
| @@ -43,10 +44,7 @@ namespace Ice {
|
| // variable is in a separate section and therefore the sections will be
|
| // trivially contiguous.
|
| //
|
| -// The motivation for requiring that writeFunctionCode happen after
|
| -// writeDataSection: to keep the .text and .data sections contiguous in the
|
| -// file. Having both -fdata-sections and -ffunction-sections does allow
|
| -// relaxing this requirement.
|
| +// TODO(jpp): explain what's going on here.
|
| class ELFObjectWriter {
|
| ELFObjectWriter() = delete;
|
| ELFObjectWriter(const ELFObjectWriter &) = delete;
|
| @@ -64,7 +62,8 @@ public:
|
| // of each global's definition in the symbol table.
|
| // Use the given target's RelocationKind for any relocations.
|
| void writeDataSection(const VariableDeclarationList &Vars,
|
| - FixupKind RelocationKind);
|
| + FixupKind RelocationKind,
|
| + const IceString &SectionSuffix);
|
|
|
| // Copy data of a function's text section to file and note the offset of the
|
| // symbol's definition in the symbol table.
|
| @@ -151,7 +150,8 @@ private:
|
| // SectionType, given the global variables Vars belonging to that SectionType.
|
| void writeDataOfType(SectionType SectionType,
|
| const VariableDeclarationList &Vars,
|
| - FixupKind RelocationKind);
|
| + FixupKind RelocationKind,
|
| + const IceString &SectionSuffix);
|
|
|
| // Write the final relocation sections given the final symbol table.
|
| // May also be able to seek around the file and resolve function calls
|
|
|