Home Explore Blog CI



man-pages

5th chunk of `ld.man`
6d32d3d50155f1ad5dd8e0668052d2d4324533f4c2e9dc610000000100000fa6
 size 8
                     .data.2: size 0x10
                     .data.3: size 4

                     results in .data.1 affected to mem1, and .data.2 and .data.3
                     affected to mem2, even though .data.3 would fit in mem3.

           This option is incompatible with INSERT statements because it changes the way input sections are mapped to output sections.

       --enable-non-contiguous-regions-warnings
           This option enables warnings when "--enable-non-contiguous-regions" allows possibly unexpected matches in sections mapping, potentially leading to silently discarding a section instead of failing because  it  does
           not fit any output region.

       -e entry
       --entry=entry
           Use  entry  as  the explicit symbol for beginning execution of your program, rather than the default entry point.  If there is no symbol named entry, the linker will try to parse entry as a number, and use that as
           the entry address (the number will be interpreted in base 10; you may use a leading 0x for base 16, or a leading 0 for base 8).

       --exclude-libs lib,lib,...
           Specifies a list of archive libraries from which symbols should not be automatically exported.  The library names may be delimited by commas or colons.  Specifying "--exclude-libs  ALL"  excludes  symbols  in  all
           archive  libraries  from  automatic  export.   This option is available only for the i386 PE targeted port of the linker and for ELF targeted ports.  For i386 PE, symbols explicitly listed in a .def file are still
           exported, regardless of this option.  For ELF targeted ports, symbols affected by this option will be treated as hidden.

       --exclude-modules-for-implib module,module,...
           Specifies a list of object files or archive members, from which symbols should not be automatically exported, but which should be copied wholesale into the import library being  generated  during  the  link.   The
           module  names may be delimited by commas or colons, and must match exactly the filenames used by ld to open the files; for archive members, this is simply the member name, but for object files the name listed must
           include and match precisely any path used to specify the input file on the linker’s command‐line.  This option is available only for the i386 PE targeted port of the linker.  Symbols explicitly listed  in  a  .def
           file are still exported, regardless of this option.

       -E
       --export-dynamic
       --no-export-dynamic
           When  creating  a dynamically linked executable, using the -E option or the --export-dynamic option causes the linker to add all symbols to the dynamic symbol table.  The dynamic symbol table is the set of symbols
           which are visible from dynamic objects at run time.

           If you do not use either of these options (or use the --no-export-dynamic option to restore the default behavior), the dynamic symbol table will normally contain only those symbols which  are  referenced  by  some
           dynamic object mentioned in the link.

           If  you use "dlopen" to load a dynamic object which needs to refer back to the symbols defined by the program, rather than some other dynamic object, then you will probably need to use this option when linking the
           program itself.

           You can also use the dynamic list to control what symbols should be added to the dynamic symbol table if the output format supports it.  See the description of --dynamic-list.

           Note that this option is specific to ELF targeted ports.  PE targets support a similar function to export all symbols from a DLL or EXE; see the description of --export-all-symbols below.

       --export-dynamic-symbol=glob
           When creating a dynamically linked executable, symbols matching glob will be added to the dynamic symbol table. When creating a shared library, references to  symbols  matching  glob

Title: LD (GNU Linker) - Command Line Options (Continued)
Summary
This section continues detailing command line options for the GNU linker (ld). It includes: - `-e` or `--entry`: Specifies the explicit symbol for the beginning of program execution. - `--exclude-libs`: Specifies archive libraries from which symbols should not be automatically exported (i386 PE and ELF targets only). - `--exclude-modules-for-implib`: Specifies object files or archive members from which symbols should not be automatically exported, but should be copied into the import library (i386 PE targets only). - `-E`, `--export-dynamic`, `--no-export-dynamic`: Controls the inclusion of symbols in the dynamic symbol table for dynamically linked executables (ELF targets only). The default behavior is to only include symbols referenced by dynamic objects. - `--export-dynamic-symbol=glob`: Adds symbols matching the glob pattern to the dynamic symbol table when creating a dynamically linked executable.