diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-07-07 20:42:48 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-07-07 20:42:48 +0000 |
commit | 4049609622e9f1c52c6f1a95b32aff84aba29aec (patch) | |
tree | 0ddac75304a0abf1d3be3049e15535749fbe2b47 /bfd/coff-i386.c | |
parent | 81272efdfd3ef896b11a53a92f60675c111e7c75 (diff) | |
download | gdb-4049609622e9f1c52c6f1a95b32aff84aba29aec.zip gdb-4049609622e9f1c52c6f1a95b32aff84aba29aec.tar.gz gdb-4049609622e9f1c52c6f1a95b32aff84aba29aec.tar.bz2 |
* coff-i386.c (coff_i386_is_local_label_name): New static function
if TARGET_UNDERSCORE.
(coff_bfd_is_local_label_name): Define if TARGET_UNDERSCORE.
(i386coff_vec): Add SEC_CODE and SEC_DATA to section_flags.
Diffstat (limited to 'bfd/coff-i386.c')
-rw-r--r-- | bfd/coff-i386.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c index 04de751..b6b6257 100644 --- a/bfd/coff-i386.c +++ b/bfd/coff-i386.c @@ -417,9 +417,30 @@ coff_i386_reloc_type_lookup (abfd, code) } } +#define coff_rtype_to_howto coff_i386_rtype_to_howto +#ifdef TARGET_UNDERSCORE -#define coff_rtype_to_howto coff_i386_rtype_to_howto +/* If i386 gcc uses underscores for symbol names, then it does not use + a leading dot for local labels, so if TARGET_UNDERSCORE is defined + we treat all symbols starting with L as local. */ + +static boolean coff_i386_is_local_label_name PARAMS ((bfd *, const char *)); + +static boolean +coff_i386_is_local_label_name (abfd, name) + bfd *abfd; + const char *name; +{ + if (name[0] == 'L') + return true; + + return _bfd_coff_is_local_label_name (abfd, name); +} + +#define coff_bfd_is_local_label_name coff_i386_is_local_label_name + +#endif /* TARGET_UNDERSCORE */ #include "coffcode.h" @@ -507,9 +528,11 @@ const bfd_target HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED), #ifndef COFF_WITH_PE - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */ + (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */ + | SEC_CODE | SEC_DATA), #else (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */ + | SEC_CODE | SEC_DATA | SEC_LINK_ONCE | SEC_LINK_DUPLICATES), #endif |