diff options
author | Alan Modra <modra@gmail.com> | 2011-05-29 04:51:43 +0000 |
---|---|---|
committer | Alan Modra <modra@gmail.com> | 2011-05-29 04:51:43 +0000 |
commit | ee1f6b65a516cfda457f53e00b632596f3acd6cd (patch) | |
tree | 1a91cbf10fae1f1ed2eb1ee126258ced020a6817 | |
parent | 7f38e8b8930c1113e1355935a894f0a56d40f8d3 (diff) | |
download | newlib-ee1f6b65a516cfda457f53e00b632596f3acd6cd.zip newlib-ee1f6b65a516cfda457f53e00b632596f3acd6cd.tar.gz newlib-ee1f6b65a516cfda457f53e00b632596f3acd6cd.tar.bz2 |
PR 12365
PR 12613
PR 12632
PR 12739
PR 12753
PR 12760
PR 12763
Apply fix from mainline along with assorted other small fixes.
-rw-r--r-- | include/ChangeLog | 15 | ||||
-rw-r--r-- | include/ansidecl.h | 9 | ||||
-rw-r--r-- | include/bfdlink.h | 14 |
3 files changed, 29 insertions, 9 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 684e7b5..1cf4f0b 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,18 @@ +2011-05-29 Alan Modra <amodra@gmail.com> + + Apply from mainline + 2011-05-17 Alan Modra <amodra@gmail.com> + PR ld/12760 + * bfdlink.h (struct bfd_link_callbacks <notice>): Add "flags" and + "string" param. + + 2011-05-16 Alan Modra <amodra@gmail.com> + * bfdlink.h (struct bfd_link_hash_entry): Remove u.undef.weak field. + + 2011-04-25 Jan Kratochvil <jan.kratochvil@redhat.com> + * bfdlink.h (ENUM_BITFIELD): Remove. + * ansidecl.h (ENUM_BITFIELD): New, from gcc/system.h. + 2011-04-27 Alan Modra <amodra@gmail.com> Backport from mainline. diff --git a/include/ansidecl.h b/include/ansidecl.h index 8b76647..c39ce2f 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -416,6 +416,15 @@ So instead we use the macro below and test it against specific values. */ #define EXPORTED_CONST const #endif +/* Be conservative and only use enum bitfields with GCC. + FIXME: provide a complete autoconf test for buggy enum bitfields. */ + +#if (GCC_VERSION > 2000) +#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE +#else +#define ENUM_BITFIELD(TYPE) unsigned int +#endif + #ifdef __cplusplus } #endif diff --git a/include/bfdlink.h b/include/bfdlink.h index 66f7645..22c29ea 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -23,12 +23,6 @@ #ifndef BFDLINK_H #define BFDLINK_H -#if (__GNUC__ * 1000 + __GNUC_MINOR__ > 2000) -#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE -#else -#define ENUM_BITFIELD(TYPE) unsigned int -#endif - /* Which symbols to strip during a link. */ enum bfd_link_strip { @@ -128,7 +122,6 @@ struct bfd_link_hash_entry undefined symbol list. */ struct bfd_link_hash_entry *next; bfd *abfd; /* BFD symbol was found in. */ - bfd *weak; /* BFD weak symbol was found in. */ } undef; /* bfd_link_hash_defined, bfd_link_hash_defweak. */ struct @@ -579,10 +572,13 @@ struct bfd_link_callbacks /* A function which is called when a symbol in notice_hash is defined or referenced. H is the symbol. ABFD, SECTION and ADDRESS are the (new) value of the symbol. If SECTION is - bfd_und_section, this is a reference. */ + bfd_und_section, this is a reference. FLAGS are the symbol + BSF_* flags. STRING is the name of the symbol to indirect to if + the sym is indirect, or the warning string if a warning sym. */ bfd_boolean (*notice) (struct bfd_link_info *, struct bfd_link_hash_entry *h, - bfd *abfd, asection *section, bfd_vma address); + bfd *abfd, asection *section, bfd_vma address, flagword flags, + const char *string); /* Error or warning link info message. */ void (*einfo) (const char *fmt, ...); |