X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fsection.c;h=654ce231b88788ab76785cbbd98dab5e27ec67d9;hb=5dccc1ddaa1d8e543c1113a83df73c6d7e6973ec;hp=3e0aa2b207907e559d225264f1d19b1109e4e22b;hpb=30727aa6d12fb866494020c0b62ab265a2bdcdfe;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/section.c b/bfd/section.c index 3e0aa2b207..654ce231b8 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -311,6 +311,10 @@ CODE_FRAGMENT . "near" the GP. *} .#define SEC_SHORT 0x2000000 . +. {* This section contains data which may be shared with other +. executables or shared objects. *} +.#define SEC_SHARED 0x4000000 +. . {* End of section flags. *} . . {* Some internal packed boolean fields. *} @@ -481,19 +485,27 @@ CODE_FRAGMENT . ((section->reloc_done) ? (section)->_cooked_size: (abort(),1)) */ +/* We use a macro to initialize the static asymbol structures because + traditional C does not permit us to initialize a union member while + gcc warns if we don't initialize it. */ + /* the_bfd, name, value, attr, section [, udata] */ +#ifdef __STDC__ +#define GLOBAL_SYM_INIT(NAME, SECTION) \ + { 0, NAME, 0, BSF_SECTION_SYM, (asection *) SECTION, { 0 }} +#else +#define GLOBAL_SYM_INIT(NAME, SECTION) \ + { 0, NAME, 0, BSF_SECTION_SYM, (asection *) SECTION } +#endif + /* These symbols are global, not specific to any BFD. Therefore, anything that tries to change them is broken, and should be repaired. */ + static const asymbol global_syms[] = { - /* the_bfd, name, value, attr, section [, udata] */ - {0, BFD_COM_SECTION_NAME, 0, BSF_SECTION_SYM, - (asection *) &bfd_com_section, { 0 }}, - {0, BFD_UND_SECTION_NAME, 0, BSF_SECTION_SYM, - (asection *) &bfd_und_section, { 0 }}, - {0, BFD_ABS_SECTION_NAME, 0, BSF_SECTION_SYM, - (asection *) &bfd_abs_section, { 0 }}, - {0, BFD_IND_SECTION_NAME, 0, BSF_SECTION_SYM, - (asection *) &bfd_ind_section, { 0 }}, + GLOBAL_SYM_INIT (BFD_COM_SECTION_NAME, &bfd_com_section), + GLOBAL_SYM_INIT (BFD_UND_SECTION_NAME, &bfd_und_section), + GLOBAL_SYM_INIT (BFD_ABS_SECTION_NAME, &bfd_abs_section), + GLOBAL_SYM_INIT (BFD_IND_SECTION_NAME, &bfd_ind_section) }; #define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \