The following examples show how to use --fieldoffsets:
To produce an output listing to stdout that contains all the field offsets from all structures in the file inputfile.o, enter:
fromelf --fieldoffsets inputfile.o
To produce an output file listing to outputfile.a that contains all the field offsets from structures in the file inputfile.o that have a name starting with p, enter:
fromelf --fieldoffsets --select=p* --output=outputfile.a inputfile.o
To produce an output listing to outputfile.a that contains all the field offsets from structures in the file inputfile.o with names of tools or moretools, enter:
fromelf --fieldoffsets --select=tools.*,moretools.* --output=outputfile.a inputfile.o
To produce an output file listing to outputfile.a that contains all the field offsets of structure fields whose name starts with number and are within structure field top in structure tools in the file inputfile.o, enter:
fromelf --fieldoffsets --select=tools.top.number* --output=outputfile.a inputfile.o