Welcome to AVR32 Linux... Users Groups

The GNU Binary Utilities

GNU Binutils is a collection of software related to manipulation of executable binaries and libraries. It consists mainly of the following parts:

  • LibBfd: Library for parsing and modification of binaries (mainly ELF), including linking.
  • LibOpcodes : Library for mapping assembler instructions to binary opcodes and vice versa
  • GnuAs : The GNU Assembler
  • GnuLd : The GNU Linker
  • BinutilsMisc : Miscellaneous utilities, disassemblers, format converters, etc.

There are also other parts like libiberty included in binutils, but those are not particularly interesting from an AVR32 hacking perspective.

AVR32 ELF definitions

The ELF format is mostly architecture-independent, but not entirely. Some aspects of it are left up to each architecture to define for itself, including, obviously, the actual binary contents: the machine code.

The ELF file header contains a field, e_machine which CPU architecture or machine type the file is to be executed on. For AVR32, this number is EM_AVR32 (0x18ad), which is defined in include/elf/common.h This number determines how the machine-specific parts of the file is to be interpreted.

The remaning AVR32-specific definitions are located in include/elf/avr32.h. These include definitions for flags that may be set in the e_flags field in the ELF file header, definitions of all the different relocation types that can be used in AVR32 ELF files as well as any architecture-specific dynamic array tags understood by the dynamic linker.

The following ELF file header flags are defined:

EF_AVR32_LINKRELAX
The file can be relaxed (i.e. optimized) by the linker. This means that all symbol references are specified using relocations so that they can be adjusted as the linker changes the size of other relocations, potentially changing the distance between a reference and its target.
EF_AVR32_PIC
The file contains position-independent code. This is necessary when linking dynamically linked executables and shared libraries.

The relocation types that may be used in AVR32 ELF files are defined on the RelocationTypes page.

The following dynamic array (_DYNAMIC) tags are defined:

DT_AVR32_GOTSZ
The total size in bytes of the Global Offset Table.

Other stuff

r6 - 2007-06-05 - 19:39:30 - HaavardSkinnemoen
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
All other trademarks are the property of their respective owners.
Syndicate this site RSSATOM