Linker Tasks

Using Linker commands

Exporting Symbols with +ee

Like the +e option, the +ee option allows you to export symbols. Unlike the +e option, the option does not alter the visibility of any other symbols in the file. It exports the specified symbol, and does not hide any of the symbols exported by default.

Exporting Symbols from main with -E

By default, the linker exports from a program only those symbols that were imported by a shared library. For example, if a shared executable's libraries do not reference the program's main routine, the linker does not include the main symbol in the a.out file's export list. Normally, this is a problem only when a program calls shared library management routines (described inChapter 6, “Shared Library Management Routines,” on page 195). To make the linker export all symbols from a program, invoke ld with the -Eoption.

The +e option allows you to be more selective about which symbols are exported, resulting in better performance. For details on +e, see “Exporting Symbols with +e”.

Hiding Symbols with -h

The -hoption allows you to hide symbols. Hiding a symbol makes the symbol a local definition, accessible only from the object module or library in which it is defined. Use -hif you simply want to hide a few symbols.

You can use -hoption when building a shared library (with -b) and when linking to create an a.out file. When combining .o files with -r, you can use the -hoption.

The syntax of the -hoption is:

-hsymbol

The -hoption hides symbol. Any other global symbols remain exported unless hidden with -h.

Example Using -h

Suppose you want to build a shared library from an object file that contains the following symbol definitions as displayed by the nm command:

Chapter 3

81

Page 81
Image 81
Kenwood HP 9000 Exporting Symbols with +ee, Exporting Symbols from main with -E, Hiding Symbols with -h, Example Using -h

HP 9000 specifications

The Kenwood HP 9000 is a cutting-edge home appliance designed for culinary enthusiasts seeking to elevate their cooking experience. This powerful kitchen machine stands out for its multi-functionality, combining the roles of a food processor, blender, and mixer into one sleek unit.

One of the flagship features of the Kenwood HP 9000 is its robust motor, which delivers exceptional performance across various tasks. With a powerful motor that operates at multiple speeds, users can tackle everything from kneading dough to finely chopping vegetables with ease. The variable speed control allows for precision, ensuring that every ingredient is processed to perfection according to individual preferences.

The HP 9000 comes equipped with a variety of attachments that enhance its versatility. Among these are a stainless-steel mixing bowl, a dough hook, a whisk, and multiple cutting blades. This extensive array of accessories means that users can whip up delightful pastries, create homemade pasta, or prepare smoothies with minimal hassle. Each attachment is designed for easy attachment and removal, making the transition between tasks seamless and efficient.

Another key characteristic of the Kenwood HP 9000 is its advanced safety features. The design incorporates mechanisms that prevent the machine from operating unless all components are securely in place. This not only gives users peace of mind while cooking but also ensures longevity for the appliance, reducing the risk of wear and tear over time.

In terms of design, the HP 9000 is both modern and aesthetically pleasing. Its ergonomic shape and compact size make it easy to store and use in various kitchen settings, while the high-quality materials used in its construction guarantee durability and longevity. The user interface is intuitive, with clearly labeled buttons that facilitate operation, ensuring that even novice cooks can navigate the machine effortlessly.

Additionally, the Kenwood HP 9000 features innovative technologies, such as an integrated digital timer and a pulse function for added control during food preparation. These features enhance cooking precision, allowing users to achieve consistent results every time.

In summary, the Kenwood HP 9000 is an exceptional kitchen appliance that combines power, versatility, and safety. With its advanced features and user-friendly design, it is an ideal choice for anyone looking to simplify their cooking process while achieving professional-level results. Whether you're whipping up a quick meal or tackling an elaborate recipe, the HP 9000 is a reliable companion that will inspire culinary creativity.