This patch implements writing function descriptors and TOC base into data section,
and also add function descriptors(both csect and label) and TOC base symbols to the symbol table.
Details
Diff Detail
Event Timeline
llvm/lib/MC/XCOFFObjectWriter.cpp | ||
---|---|---|
256 | I am not sure whether all function description data will be group together and than put in the .data section of xcoffobjectfile? all the variable data and function description will be interleaved into data section. As I remember, I read some document , it talk about that , we put all variables in the data section first. then function description,s final is TOC entries. Maybe I wrong. |
llvm/lib/MC/XCOFFObjectWriter.cpp | ||
---|---|---|
256 | I prefer added CsectGroup DSCsects; for function description csect. |
Sure. I will do it somewhere.
llvm/lib/MC/XCOFFObjectWriter.cpp | ||
---|---|---|
256 | Interleaving is acceptable for XCOFF format. What it hurts is readability of the symbol table. |
llvm/lib/MC/XCOFFObjectWriter.cpp | ||
---|---|---|
256 | I can add a separate CsectGroup to make the contract more explicit. |
llvm/lib/MC/XCOFFObjectWriter.cpp | ||
---|---|---|
256 | thanks Jason for clarification. |
llvm/lib/MC/XCOFFObjectWriter.cpp | ||
---|---|---|
154 | I am not quite sure, but my understanding is that we only have one TOC base csect in one translation unit? If I am correct, do we want to name this TOCCsect or add a comment to specify that point? It's a little confused to see plural here. |
llvm/lib/MC/XCOFFObjectWriter.cpp | ||
---|---|---|
154 | Seconded. Do you intend to map the toc entries into this csect group as well? | |
256 | If we intend to map the toc entries into TOCCsects along side the toc base csect then its probably best to follow suit and have a separate csect group for the descriptors and make this ordering explicit. If not then we need to have lit test that explicitly check that descriptor data is mapped to after read/write data. It might be worthwhile to check said tests with LLVM_REVERSE_ITERATION enabled as well to see if that has any affect. |
Added separate CsectGroup to contain function descriptor csects.
Added assertion to assert uniqueness TOC base.
llvm/lib/MC/XCOFFObjectWriter.cpp | ||
---|---|---|
154 | The current intend is to map toc entries into this csect group. Hence named it TOCCsects. And I put an assertion in getCsectGroup() to make sure TOC-base is unique and is the first in the group. | |
256 | I map the function descriptor to a separate csect group now. |
I am not quite sure, but my understanding is that we only have one TOC base csect in one translation unit? If I am correct, do we want to name this TOCCsect or add a comment to specify that point? It's a little confused to see plural here.