~ubuntu-branches/debian/jessie/gdb/jessie

« back to all changes in this revision

Viewing changes to bfd/elf-bfd.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Jacobowitz
  • Date: 2010-03-20 01:21:29 UTC
  • mfrom: (1.3.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100320012129-t7h25y8zgr8c2369
Tags: 7.1-1
* New upstream release, including:
  - PIE support (Closes: #346409).
  - C++ improvements, including static_cast<> et al, namespace imports,
    and bug fixes in printing virtual base classes.
  - Multi-program debugging.  One GDB can now debug multiple programs
    at the same time.
  - Python scripting improvements, including gdb.parse_and_eval.
  - Updated MIPS Linux signal frame layout (Closes: #570875).
  - No internal error stepping over _dl_debug_state (Closes: #569551).
* Update to Standards-Version: 3.8.4 (no changes required).
* Include more relevant (and smaller) docs in the gdbserver package
  (Closes: #571132).
* Do not duplicate documentation in gdb64, gdb-source, and libgdb-dev.
* Fix crash when switching into TUI mode (Closes: #568489).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* BFD back-end data structures for ELF files.
2
2
   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
3
 
   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
 
3
   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4
4
   Free Software Foundation, Inc.
5
5
   Written by Cygnus Support.
6
6
 
305
305
        asection *sec;
306
306
      } u;
307
307
 
 
308
      /* The offset of the personality data from the start of the CIE,
 
309
         or 0 if the CIE doesn't have any.  */
 
310
      unsigned int personality_offset : 8;
 
311
 
308
312
      /* True if we have marked relocations associated with this CIE.  */
309
313
      unsigned int gc_mark : 1;
310
314
 
312
316
         a PC-relative one.  */
313
317
      unsigned int make_lsda_relative : 1;
314
318
 
315
 
      /* True if the CIE contains personality data and if that data
316
 
         uses a PC-relative encoding.  */
 
319
      /* True if we have decided to turn an absolute personality
 
320
         encoding into a PC-relative one.  */
 
321
      unsigned int make_per_encoding_relative : 1;
 
322
 
 
323
      /* True if the CIE contains personality data and if that
 
324
         data uses a PC-relative encoding.  Always true when
 
325
         make_per_encoding_relative is.  */
317
326
      unsigned int per_encoding_relative : 1;
318
327
 
319
328
      /* True if we need to add an 'R' (FDE encoding) entry to the
322
331
 
323
332
      /* True if we have merged this CIE with another.  */
324
333
      unsigned int merged : 1;
 
334
 
 
335
      /* Unused bits.  */
 
336
      unsigned int pad1 : 18;
325
337
    } cie;
326
338
  } u;
327
339
  unsigned int reloc_index;
384
396
  bfd_boolean table;
385
397
};
386
398
 
 
399
/* Enum used to identify target specific extensions to the elf_obj_tdata
 
400
   and elf_link_hash_table structures.  Note the enums deliberately start
 
401
   from 1 so that we can detect an uninitialized field.  The generic value
 
402
   is last so that additions to this enum do not need to modify more than
 
403
   one line.  */
 
404
enum elf_target_id
 
405
{
 
406
  ALPHA_ELF_DATA = 1,
 
407
  ARM_ELF_DATA,
 
408
  AVR_ELF_DATA,
 
409
  BFIN_ELF_DATA,
 
410
  CRIS_ELF_DATA,
 
411
  FRV_ELF_DATA,
 
412
  HPPA32_ELF_DATA,
 
413
  HPPA64_ELF_DATA,
 
414
  I386_ELF_DATA,
 
415
  IA64_ELF_DATA,
 
416
  LM32_ELF_DATA,
 
417
  M32R_ELF_DATA,
 
418
  M68HC11_ELF_DATA,
 
419
  M68K_ELF_DATA,
 
420
  MICROBLAZE_ELF_DATA,
 
421
  MIPS_ELF_DATA,
 
422
  MN10300_ELF_DATA,
 
423
  PPC32_ELF_DATA,
 
424
  PPC64_ELF_DATA,
 
425
  S390_ELF_DATA,
 
426
  SH_ELF_DATA,
 
427
  SPARC_ELF_DATA,
 
428
  SPU_ELF_DATA,
 
429
  X86_64_ELF_DATA,
 
430
  XTENSA_ELF_DATA,
 
431
  GENERIC_ELF_DATA
 
432
};
 
433
 
387
434
/* ELF linker hash table.  */
388
435
 
389
436
struct elf_link_hash_table
390
437
{
391
438
  struct bfd_link_hash_table root;
392
439
 
 
440
  /* An identifier used to distinguish different target
 
441
     specific extensions to this structure.  */
 
442
  enum elf_target_id hash_table_id;
 
443
 
393
444
  /* Whether we have created the special dynamic sections required
394
445
     when linking against or generating a shared object.  */
395
446
  bfd_boolean dynamic_sections_created;
497
548
 
498
549
#define elf_hash_table(p) ((struct elf_link_hash_table *) ((p)->hash))
499
550
 
 
551
#define elf_hash_table_id(table)        ((table) -> hash_table_id)
 
552
 
500
553
/* Returns TRUE if the hash table is a struct elf_link_hash_table.  */
501
554
#define is_elf_hash_table(htab)                                         \
502
555
  (((struct bfd_link_hash_table *) (htab))->type == bfd_link_elf_hash_table)
1406
1459
  Tag_compatibility = 32
1407
1460
};
1408
1461
 
1409
 
/* Enum used to identify target specific extensions to the elf_obj_tdata
1410
 
   structure.  Note the enums deliberately start from 1 so that we can
1411
 
   detect an uninitialized field.  The generic value is last so that
1412
 
   additions to this enum do not need to modify more than one line.  */
1413
 
enum elf_object_id
1414
 
{
1415
 
  ALPHA_ELF_TDATA = 1,
1416
 
  ARM_ELF_TDATA,
1417
 
  HPPA_ELF_TDATA,
1418
 
  I386_ELF_TDATA,
1419
 
  MIPS_ELF_TDATA,
1420
 
  PPC32_ELF_TDATA,
1421
 
  PPC64_ELF_TDATA,
1422
 
  S390_ELF_TDATA,
1423
 
  SH_ELF_TDATA,
1424
 
  SPARC_ELF_TDATA,
1425
 
  X86_64_ELF_TDATA,
1426
 
  XTENSA_ELF_TDATA,
1427
 
  GENERIC_ELF_TDATA
1428
 
};
1429
 
 
1430
1462
/* Some private data is stashed away for future use using the tdata pointer
1431
1463
   in the bfd structure.  */
1432
1464
 
1491
1523
     one.  */
1492
1524
  const char *dt_name;
1493
1525
 
 
1526
  /* The linker emulation needs to know what audit libs
 
1527
     are used by a dynamic object.  */ 
 
1528
  const char *dt_audit;
 
1529
 
1494
1530
  /* Records the result of `get_program_header_size'.  */
1495
1531
  bfd_size_type program_header_size;
1496
1532
 
1587
1623
 
1588
1624
  /* An identifier used to distinguish different target
1589
1625
     specific extensions to this structure.  */
1590
 
  enum elf_object_id object_id;
 
1626
  enum elf_target_id object_id;
1591
1627
};
1592
1628
 
1593
1629
#define elf_tdata(bfd)          ((bfd) -> tdata.elf_obj_data)
1620
1656
#define elf_local_got_offsets(bfd) (elf_tdata(bfd) -> local_got.offsets)
1621
1657
#define elf_local_got_ents(bfd) (elf_tdata(bfd) -> local_got.ents)
1622
1658
#define elf_dt_name(bfd)        (elf_tdata(bfd) -> dt_name)
 
1659
#define elf_dt_audit(bfd)       (elf_tdata(bfd) -> dt_audit)
1623
1660
#define elf_dyn_lib_class(bfd)  (elf_tdata(bfd) -> dyn_lib_class)
1624
1661
#define elf_bad_symtab(bfd)     (elf_tdata(bfd) -> bad_symtab)
1625
1662
#define elf_flags_init(bfd)     (elf_tdata(bfd) -> flags_init)
1693
1730
extern bfd_reloc_status_type bfd_elf_generic_reloc
1694
1731
  (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
1695
1732
extern bfd_boolean bfd_elf_allocate_object
1696
 
  (bfd *, size_t, enum elf_object_id);
 
1733
  (bfd *, size_t, enum elf_target_id);
1697
1734
extern bfd_boolean bfd_elf_make_generic_object
1698
1735
  (bfd *);
1699
1736
extern bfd_boolean bfd_elf_mkcorefile
1717
1754
  (struct elf_link_hash_table *, bfd *,
1718
1755
   struct bfd_hash_entry *(*)
1719
1756
     (struct bfd_hash_entry *, struct bfd_hash_table *, const char *),
1720
 
   unsigned int);
 
1757
   unsigned int, enum elf_target_id);
1721
1758
extern bfd_boolean _bfd_elf_slurp_version_tables
1722
1759
  (bfd *, bfd_boolean);
1723
1760
extern bfd_boolean _bfd_elf_merge_sections
1734
1771
  (asection *, struct bfd_link_info *);
1735
1772
extern void _bfd_elf_link_just_syms
1736
1773
  (asection *, struct bfd_link_info *);
 
1774
extern void _bfd_elf_copy_link_hash_symbol_type
 
1775
  (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
1737
1776
extern bfd_boolean _bfd_elf_copy_private_header_data
1738
1777
  (bfd *, bfd *);
1739
1778
extern bfd_boolean _bfd_elf_copy_private_symbol_data
2130
2169
  (bfd *, char *, int *, const void *, int);
2131
2170
extern char *elfcore_write_prxfpreg
2132
2171
  (bfd *, char *, int *, const void *, int);
 
2172
extern char *elfcore_write_xstatereg
 
2173
  (bfd *, char *, int *, const void *, int);
2133
2174
extern char *elfcore_write_ppc_vmx
2134
2175
  (bfd *, char *, int *, const void *, int);
2135
2176
extern char *elfcore_write_ppc_vsx
2136
2177
  (bfd *, char *, int *, const void *, int);
 
2178
extern char *elfcore_write_s390_timer
 
2179
  (bfd *, char *, int *, const void *, int);
 
2180
extern char *elfcore_write_s390_todcmp
 
2181
  (bfd *, char *, int *, const void *, int);
 
2182
extern char *elfcore_write_s390_todpreg
 
2183
  (bfd *, char *, int *, const void *, int);
 
2184
extern char *elfcore_write_s390_ctrs
 
2185
  (bfd *, char *, int *, const void *, int);
 
2186
extern char *elfcore_write_s390_prefix
 
2187
  (bfd *, char *, int *, const void *, int);
2137
2188
extern char *elfcore_write_lwpstatus
2138
2189
  (bfd *, char *, int *, long, int, const void *);
2139
2190
extern char *elfcore_write_register_note