aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-01-26 19:54:40 +0000
committerIan Lance Taylor <ian@airs.com>1993-01-26 19:54:40 +0000
commit4b9c23a9f584e14b6be0acf64bf54eb9d99a7a17 (patch)
tree6955093db2ba0599c1bb6e44be5a2691e52163ad /include
parent382f2a3d75c1c09a1b63334d045d13f621a7a32b (diff)
downloadgdb-4b9c23a9f584e14b6be0acf64bf54eb9d99a7a17.zip
gdb-4b9c23a9f584e14b6be0acf64bf54eb9d99a7a17.tar.gz
gdb-4b9c23a9f584e14b6be0acf64bf54eb9d99a7a17.tar.bz2
Tue Jan 26 11:49:20 1993 Ian Lance Taylor (ian@cygnus.com)
* bfd.h: Update for SEC_IS_COMMON flag.
Diffstat (limited to 'include')
-rw-r--r--include/bfd.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/bfd.h b/include/bfd.h
index 3f9947e..476bf3d 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
<<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>, a debug section could be
<<SEC_HAS_CONTENTS>> */
@@ -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 { \