• Home
  • Raw
  • Download

Lines Matching +full:external +full:- +full:contents

41 	outFlag       = flag.String("out", "-", "File to write output symbols")
42 …objFileFormat = flag.String("obj-file-format", defaultObjFileFormat(runtime.GOOS), "Object file fo…
55 // cross-compile from an unsupported platform to a supported platform by
71 …printAndExit("Usage: %s [-out OUT] [-obj-file-format FORMAT] ARCHIVE_FILE [ARCHIVE_FILE [...]]", o…
76 if *outFlag != "-" {
99 for name, contents := range objectFiles {
100 syms, err := listSymbols(contents)
120 // symbol-prefixing strategy that we cannot distinguish
160 func listSymbols(contents []byte) ([]string, error) {
163 return listSymbolsELF(contents)
165 return listSymbolsMachO(contents)
167 return listSymbolsPE(contents)
173 func listSymbolsELF(contents []byte) ([]string, error) {
174 f, err := elf.NewFile(bytes.NewReader(contents))
193 func listSymbolsMachO(contents []byte) ([]string, error) {
194 f, err := macho.NewFile(bytes.NewReader(contents))
203 …// Source: https://opensource.apple.com/source/xnu/xnu-3789.51.2/EXTERNAL_HEADERS/mach-o/nlist.h.a…
205 N_PEXT uint8 = 0x10 // Private external symbol bit
206 N_EXT uint8 = 0x01 // External symbol bit, set for external symbols
227 func listSymbolsPE(contents []byte) ([]string, error) {
228 f, err := pe.NewFile(bytes.NewReader(contents))
235 // https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format#section-number-values
237 // https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format#storage-class
243 // On 32-bit Windows, C symbols are decorated by calling
245 // https://msdn.microsoft.com/en-us/library/56h2zst2.aspx#FormatC