Introduce new section flag: SEC_ELF_OCTETS
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index a00dfa35150528dbbe3e411b71c93d457c4cdda7..80ff8e89b58413b15530da7967ea43d0c371f8a6 100644 (file)
@@ -992,6 +992,11 @@ typedef struct bfd_section
   /* This section contains vliw code.  This is for Toshiba MeP only.  */
 #define SEC_MEP_VLIW               0x20000000
 
+  /* All symbols, sizes and relocations in this section are octets
+     instead of bytes.  Required for DWARF debug sections as DWARF
+     information is organized in octets, not bytes.  */
+#define SEC_ELF_OCTETS             0x40000000
+
   /* Indicate that section has the no read flag set. This happens
      when memory read flag isn't set. */
 #define SEC_COFF_NOREAD            0x40000000
@@ -1993,7 +1998,8 @@ const bfd_arch_info_type *bfd_lookup_arch
 const char *bfd_printable_arch_mach
    (enum bfd_architecture arch, unsigned long machine);
 
-unsigned int bfd_octets_per_byte (const bfd *abfd);
+unsigned int bfd_octets_per_byte (const bfd *abfd,
+    const asection *sec);
 
 unsigned int bfd_arch_mach_octets_per_byte
    (enum bfd_architecture arch, unsigned long machine);
@@ -6854,7 +6860,8 @@ bfd_get_section_limit_octets (const bfd *abfd, const asection *sec)
 static inline bfd_size_type
 bfd_get_section_limit (const bfd *abfd, const asection *sec)
 {
-  return bfd_get_section_limit_octets (abfd, sec) / bfd_octets_per_byte (abfd);
+  return (bfd_get_section_limit_octets (abfd, sec)
+          / bfd_octets_per_byte (abfd, NULL));
 }
 
 /* Functions to handle insertion and deletion of a bfd's sections.  These
This page took 0.025772 seconds and 4 git commands to generate.