Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Name

ld

Synopsis

ld [options] objfiles

Combine several objfiles, in the specified order, into a single executable object module (a.out by default). ld is the link editor and is often invoked automatically by compiler commands. ld accepts many options, the most common of which are listed here.

Options

-b format, --format=format

If ld is configured to accept more than one kind of object file, this option can be used to specify the input format. format should be a GNU Binary File Descriptor (BFD), as described in the BFD library. Use objdump -i to list available formats.

-call_shared

Link with dynamic libraries.

-d, -dc, -dp

Force the assignment of space to common symbols.

-defsym symbol=expression

Create the global symbol with the value expression.

-demangle[=style]

Force demangling of symbol names. Optionally set the demangling style. Turn off demangling with -nodemangle.

-e symbol

Set symbol as the address of the output file’s entry point.

-f name

Set the DT_AUXILIARY field of ELF shared object to name.

-fini name

Set the DT_FINI field of ELF shared object to the address of function name. The default function is _fini.

-h name

Set the DT_SONAME field of ELF shared object to name.

--help

Print help message, then exit.

-i

Produce a linkable output file; attempt to set its magic number to OMAGIC.

-init name

Set the DT_INIT field of ELF shared object to the address of function name. The default function is _init.

-larch, --library=archive

Include the archive file arch in the list of files to link.

-m linker

Emulate ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page