Skip to Main Content
Linux in a Nutshell, Fourth Edition
book

Linux in a Nutshell, Fourth Edition

by Ellen Siever, Stephen Figgins, Aaron Weber
June 2003
Beginner to intermediate content levelBeginner to intermediate
944 pages
43h 1m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, Fourth 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 command 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.

-l arch, --library= archive

Include the archive file arch in the list of ...

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

Linux in a Nutshell, 6th Edition

Linux in a Nutshell, 6th Edition

Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
Linux in Action

Linux in Action

David Clinton
Hands-On System Programming with Linux

Hands-On System Programming with Linux

Kaiwan N. Billimoria, Tigran Aivazian
Embedded Linux for Developers

Embedded Linux for Developers

Alexandru Vaduva, Alex González, Chris Simmonds

Publisher Resources

ISBN: 0596004826