LLVM 19.0.0git
Public Attributes | List of all members
llvm::objcopy::macho::WeakBindInfo Struct Reference

The location of the weak bind info inside the binary is described by LC_DYLD_INFO load command. More...

#include "ObjCopy/MachO/MachOObject.h"

Public Attributes

ArrayRef< uint8_t > Opcodes
 

Detailed Description

The location of the weak bind info inside the binary is described by LC_DYLD_INFO load command.

Some C++ programs require dyld to unique symbols so that all images in the process use the same copy of some code/data. This step is done after binding. The content of the weak_bind info is an opcode stream like the bind_info. But it is sorted alphabetically by symbol name. This enable dyld to walk all images with weak binding information in order and look for collisions. If there are no collisions, dyld does no updating. That means that some fixups are also encoded in the bind_info. For instance, all calls to "operator new" are first bound to libstdc++.dylib using the information in bind_info. Then if some image overrides operator new that is detected when the weak_bind information is processed and the call to operator new is then rebound.

Definition at line 245 of file MachOObject.h.

Member Data Documentation

◆ Opcodes

ArrayRef<uint8_t> llvm::objcopy::macho::WeakBindInfo::Opcodes

Definition at line 248 of file MachOObject.h.

Referenced by llvm::objcopy::macho::MachOWriter::totalSize().


The documentation for this struct was generated from the following file: