From: Ian Lance Taylor Date: Tue, 26 Jan 1993 19:54:40 +0000 (+0000) Subject: Tue Jan 26 11:49:20 1993 Ian Lance Taylor (ian@cygnus.com) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4b9c23a9f584e14b6be0acf64bf54eb9d99a7a17;p=binutils-gdb.git Tue Jan 26 11:49:20 1993 Ian Lance Taylor (ian@cygnus.com) * bfd.h: Update for SEC_IS_COMMON flag. --- diff --git a/include/bfd.h b/include/bfd.h index 3f9947e2709..476bf3d5336 100644 --- a/include/bfd.h +++ b/include/bfd.h @@ -193,6 +193,8 @@ typedef struct sec *sec_ptr; #define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0) #define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata) +#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) + #define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (val)), ((ptr)->user_set_vma = true), true) #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true) #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true) @@ -462,15 +464,13 @@ typedef struct sec /* The section is a constuctor, and should be placed at the end of the . */ - #define SEC_CONSTRUCTOR_TEXT 0x1100 #define SEC_CONSTRUCTOR_DATA 0x2100 #define SEC_CONSTRUCTOR_BSS 0x3100 - - /* The section has contents - a bss section could be + /* The section has contents - a data section could be <> | <>, a debug section could be <> */ @@ -488,6 +488,13 @@ typedef struct sec #define SEC_SHARED_LIBRARY 0x800 + /* The section is a common section (symbols may be defined + multiple times, the value of a symbol is the amount of + space it requires, and the largest symbol value is the one + used). Most targets have exactly one of these (.bss), but + ECOFF has two. */ + +#define SEC_IS_COMMON 0x8000 bfd_vma vma; boolean user_set_vma; @@ -888,7 +895,7 @@ typedef CONST struct reloc_howto_struct #define HOWTO_PREPARE(relocation, symbol) \ { \ if (symbol != (asymbol *)NULL) { \ - if (symbol->section == &bfd_com_section) { \ + if (bfd_is_com_section (symbol->section)) { \ relocation = 0; \ } \ else { \