1

Is there any tool that allows me to list TOC entries in an XCOFF file?

Vojislav Stojkovic
  • 8,043
  • 4
  • 35
  • 48
  • This doesn't answer your specific question but I'm assuming you're worried about TOC overflow and are trying to avoid it. In case that's your concern, you may wish to try one of: -qipa=level=0 (or -O4 if you're willing to wait a bit longer and appreciate the benefits of interprocedural inlining) -mminimal-toc See TOC Overflow: [Getting help from the XL compilers](https://www.ibm.com/developerworks/mydeveloperworks/blogs/5894415f-be62-4bc0-81c5-3956e82276f3/entry/toc_overflow_getting_help_from_the_xl_compilers?lang=en). – TheDuke Mar 16 '13 at 06:31

2 Answers2

1

I haven't found a tool that does this, but I wanted to document my experience, just in case it helps someone else.

In my particular case, what I needed was a way of knowing what TOC entries were produced by my own code. My first approach was to look for a tool that can list TOC entries in the object files compiled from my source code. Having failed to do that, I had to look for another approach.

I managed to get the information I was looking for by using the -S option on XLC command line. I could then get the information about TOC entries by inspecting the .s files for .toc and .tc pseudo-ops.

Vojislav Stojkovic
  • 8,043
  • 4
  • 35
  • 48
0

Not sure if this helps.

http://www.regatta.cs.msu.su/doc/usr/share/man/info/ru_RU/a_doc_lib/cmds/aixcmds2/dump.htm

But it should not be too hard to make a small tool to do that.

agou
  • 728
  • 1
  • 10
  • 24