SEG_ADDR_TABLE(l)
okay so this is the SEG_ADDR_TABLE(l) manual page, and honestly? it's giving "niche build-system lore that absolutely slaps." stay with me bestie, we're gonna get through every single flag together π
β¨ NAME β¨
seg_addr_table β re-layout, update or check a segment address table
π SYNOPSIS π
seg_addr_table [operation] [options] [-o output_file]
π¦ DESCRIPTION π¦
seg_addr_table re-lays out, updates or checks a segment address table. If it can do its operation without problems, seg_addr_table(l) exits with zero status. Otherwise it exits with a non-zero status and prints an error message about the problem. no cap, that's the whole success metric.
The Apple Build and Integration team uses the segment address table in /AppleInternal/Developer/seg_addr_table to set the preferred addresses of dynamic libraries. Go peek at the ld(1) man page under the -seg_addr_table option and its environment variable LD_SEG_ADDR_TABLE β that's where the lore connects π₯
The format of segment address table is lines of three forms. The entries in the table are lines containing either a single hex address and an install name, or two hex addresses and an install name.
- In the first form, the single hex address is used for ``flat'' libraries and is the
-seg1addr. - In the second form, it's used for ``split'' libraries β the first address is the
-segs_read_only_addraddress and the second is the-segs_read_write_addraddress. - The third form is used for fixed regions that are not to be allocated. They have a hex address and a hex size and the literal string
<<< Fixed address and size not to assign >>>.
Lines starting with the # character are treated as comments. periodt.
The output table of seg_addr_table(l) also contains two special entries. One for the next addresses to assign flat'' libraries, and one for the next addresses to assign to split'' libraries. Comments are generated before these entries stating they must not be removed. like, do NOT touch them, bestie π
The following option must be specified when using the -relayout or -update options:
-o output_fileβ Write the new segment address table tooutput_file.
One of the following operations must be specified:
-relayoutβ This causes the entire table to be re-laid out and all dynamic libraries to be assigned addresses. The addresses are assigned in the order specified and the space given to each is based on the library's virtual address sizes.-updateβ Only entries with zero address values are assigned addresses. The address assignment is based on the special entries in the table for the next addresses to assign.-update_overlapsβ Detects overlaps in the table and reassigns the lower of the two addresses. The address assignment is based on the special entries in the table for the next addresses to assign. This action is similar to detecting overlaps with-checkonly, setting the overlapping library to0x00000000and running with-update.-relayout_nonsplitβ Similar torelayoutexcept it only causes all the non split libraries to be re-laid out and all non-split dynamic libraries to be assigned addresses. The addresses are assigned in order specified and the space given to each is based on the library's virtual address sizes.-checkonlyβ This option only checks the entries in the table for overlaps.
The following options may be specified with any of the operations:
-seg_addr_table filenameβ This is the input segment address table. If not specified the default is/AppleInternal/Developer/seg_addr_table.-release release_nameβ For eachflat'' entry in the table, try finding and using the dynamic library from the `$(SYMROOT)` from the specified `release_name` to base the size of the library on. If the file is not found in the `$(SYMROOT)` or it is asplit'' entry, then use the dynamic library in the$(DSTROOT)from the specifiedrelease_nameto base the size of the library on. Without this option, the library with the install name on the machine running is used. With this option, the library with the install name on the machine running is never used. literally never π
The following options may be specified with the -relayout operation:
-seg1addr addrβ Specifies the starting address to layout ``flat'' libraries.addris a hexadecimal number and should be a multiple of the target pagesize. The default if not specified is0x41300000when the environment variableMACOSX_DEPLOYMENT_TARGETis10.1or not set and allocations are into increasing addresses. WhenMACOSX_DEPLOYMENT_TARGETis10.2or greater the default is0x7ffc0000and allocations are into decreasing addresses.-allocate_flat directionβ Specifies which direction to allocate flat addresses into. The argumentdirectioncan be eitherincreasingordecreasing. The default if not specified isincreasingwhen the environment variableMACOSX_DEPLOYMENT_TARGETis10.1or not set, and whenMACOSX_DEPLOYMENT_TARGETis10.2or greater the default isdecreasing.-segs_read_only_addr addrβ Specifies the starting address to layout the read-only segments of ``split'' libraries.addris a hexadecimal number and should be a multiple of the target pagesize. The default if not specified is0x70000000when the environment variableMACOSX_DEPLOYMENT_TARGETis10.1or not set, and whenMACOSX_DEPLOYMENT_TARGETis10.2or greater the default is0x90000000.-segs_read_write_addr addrβ Specifies the starting address to layout the read-write segments of ``split'' libraries.addris a hexadecimal number and should be a multiple of the target pagesize. The default if not specified is0x80000000when the environment variableMACOSX_DEPLOYMENT_TARGETis10.1or not set, and whenMACOSX_DEPLOYMENT_TARGETis10.2or greater the default is0xa0000000.
The following options may be specified with any operation:
-disablewarningsβ This option disables a small number of warnings which is useful for B&I when running the-updateoperation and there are entries in the table that have problems. These entries are then removed from the table when creating the output.-arch arch_typeβ Specifies the architecture,arch_type, in the files to use for the sizes. More than one-arch arch_typecan be specified. The default is-arch allwhich uses all architectures in the file. Seearch(3)for the currently knownarch_types.
π SEE ALSO π
and that's the whole vibe check π this icon was brought to you by Apple Computer, Inc., dated May 24, 2002, and it lives under the name SEG_ADDR_TABLE(l) β slay, honestly π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: cctools 1010.6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms