NAME
segedit - extract and replace sections from object files
SYNOPSIS
sseeggeeddiitt [ option ] name ... inputfile [-extract segname sectname
filename] ... [[-replace segname sectname filename] ... -output out-
putfile]DESCRIPTION
Segedit extracts and or replaces the named sections from the inputfile and creates an outputfile (if replacing a section). The segment andsection names are the same as specified to ld(1) with the -sseeggccrreeaattee
option. The segment and section names of an object file can be exam-
ined with the -ll option to otool(1). Only sections in segments that
have no relocation to or for them can be replaced (marked with the SGNORELOC segment flag) but all sections can be extracted.The options to segedit(1):
-eexxttrraacctt segname sectname filename
Extracts the section specified by the segment name section name pair and places the contents in the specified filename.-rreeppllaaccee segname sectname filename
Will replace the section specified by the segment name section name pair and places and take the new contents for the sectionfrom the specified filename. The -oouuttppuutt filename option must
also be specified. The resulting size of the section will be rounded to a multiple of 4 bytes and padded with zero bytes if necessary.-oouuttppuutt outputfile
Specifies the output file to create when replacing sections.SEE ALSO
ld(1), otool(1) LLIIMMIITTAATTIIOONNSSOnly mach-O format files that are laid out in a contiguous address
space and with their contents ordered in the order of increasing address can have their segments replaced by this program. This layout is what the link editor produces by default. Apple Computer, Inc. October 23, 1997 SEGEDIT(1)