This is an archive of the discontinued LLVM Phabricator instance.

add the xcoff symbol size for the llvm-nm.
ClosedPublic

Authored by DiggerLin on Nov 3 2021, 7:39 AM.

Diff Detail

Event Timeline

DiggerLin created this revision.Nov 3 2021, 7:39 AM
DiggerLin requested review of this revision.Nov 3 2021, 7:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 3 2021, 7:39 AM

The testing for this patch really needs to be dramatically simplified - I can't tell if there's anything important about the various different symbols present in the size.test output, for the purposes of that test.

@Esme, what's missing from yaml2obj to be able to do this test? How soon do you think you could add it?

The testing for this patch really needs to be dramatically simplified - I can't tell if there's anything important about the various different symbols present in the size.test output, for the purposes of that test.

@Esme, what's missing from yaml2obj to be able to do this test? How soon do you think you could add it?

the symbol size also need csect auxiliary entry of symbol.

and I just re_use the same object file "test_gcc.o" in the basic.test

DiggerLin updated this revision to Diff 384819.Nov 4 2021, 11:17 AM

reduce test case

jhenderson added inline comments.Nov 22 2021, 12:41 AM
llvm/test/tools/llvm-nm/XCOFF/size.test
18–23

I think it would be sufficient to only test a couple of symbols that have different sizes. You can leave out the others.

24

Why's this line here?

DiggerLin updated this revision to Diff 392430.Dec 7 2021, 8:51 AM
DiggerLin marked 2 inline comments as done.

simplify the test case.

llvm/test/tools/llvm-nm/XCOFF/size.test
18–23

I will simple the test case.
It will test the size of label, TC entry, Section Description (both for function and data).

24

thanks

jhenderson added inline comments.Dec 10 2021, 12:55 AM
llvm/test/tools/llvm-nm/XCOFF/size.test
18

There's a trailing space on this line, I think.

18–23

I'd explicitly highlight why you are specifying the specific symbols then in the test, by expanding the initial comment.

DiggerLin updated this revision to Diff 394979.Dec 16 2021, 1:27 PM
DiggerLin marked an inline comment as done.

using yaml2obj for test cases

As noted in the other llvm-nm patch, I'll be offline from the end of today until the 4th of January, and won't be able to respond to anything in that time.

llvm/test/tools/llvm-nm/XCOFF/size.test
3–5

Similar comment to the basic.test test case: move these comments to near the CHECK point, and add trailing full stops (sorry for not thinking about this earlier - now that this is written here, it's clear to me they belong elsewhere in the file).

7–8

As in other test cases, don't use --docnum with only one input, and don't use --check-prefix with only one set of CHECK lines.

14–20

Remove excessive spacing. Do you need the Address: 0x0 line?

DiggerLin marked 2 inline comments as done.Dec 20 2021, 9:44 AM
DiggerLin added inline comments.
llvm/test/tools/llvm-nm/XCOFF/size.test
14–20

the yaml2obj will default to 0x0 if not specific the address.

DiggerLin updated this revision to Diff 395484.Dec 20 2021, 9:52 AM
DiggerLin marked an inline comment as done.
jhenderson added inline comments.Jan 5 2022, 2:48 AM
llvm/test/tools/llvm-nm/XCOFF/size.test
14–20

Right, so if the default is 0x0, why do you need to specify an explicit 0x0?

48

You can delete "Size of a" from each of these comments. Just "Label symbol." etc is sufficient.

DiggerLin updated this revision to Diff 397572.Jan 5 2022, 7:24 AM
DiggerLin marked 2 inline comments as done.
DiggerLin added inline comments.
llvm/test/tools/llvm-nm/XCOFF/size.test
14–20

sorry, I misunderstand your comment , fix it.

48

thanks

This revision is now accepted and ready to land.Jan 6 2022, 12:12 AM
This revision was landed with ongoing or failed builds.Jan 11 2022, 1:25 PM
This revision was automatically updated to reflect the committed changes.