diff options
author | Tristan Gingold <gingold@adacore.com> | 2013-07-02 07:38:51 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2013-07-02 07:38:51 +0000 |
commit | 9a1ada6cce2c42163bedbef54db6a016ff74e675 (patch) | |
tree | 3ffe97aa224194273f906fe0a6c027a0918ccc5f /bfd | |
parent | a685c4e6d5a1b407ac284abbbf1bd740515f7512 (diff) | |
download | gdb-9a1ada6cce2c42163bedbef54db6a016ff74e675.zip gdb-9a1ada6cce2c42163bedbef54db6a016ff74e675.tar.gz gdb-9a1ada6cce2c42163bedbef54db6a016ff74e675.tar.bz2 |
2013-07-02 Tristan Gingold <gingold@adacore.com>
* coff-rs6000.c (xcoff_create_csect_from_smclas): Handle more smclas.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/coff-rs6000.c | 17 |
2 files changed, 13 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d915a7d..91ec839 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,9 @@ 2013-07-02 Tristan Gingold <gingold@adacore.com> + * coff-rs6000.c (xcoff_create_csect_from_smclas): Handle more smclas. + +2013-07-02 Tristan Gingold <gingold@adacore.com> + * coff-rs6000.c (xcoff_find_nearest_line_discriminator): New function. (rs6000coff_vec): Reference it. diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index cad7268..aa16e99 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -24,6 +24,7 @@ MA 02110-1301, USA. */ #include "sysdep.h" +#include "libiberty.h" #include "bfd.h" #include "bfdlink.h" #include "libbfd.h" @@ -3555,14 +3556,14 @@ xcoff_create_csect_from_smclas (bfd *abfd, /* .sv64 = x_smclas == 17 This is an invalid csect for 32 bit apps. */ - static const char *names[19] = - { - ".pr", ".ro", ".db", ".tc", ".ua", ".rw", ".gl", ".xo", - ".sv", ".bs", ".ds", ".uc", ".ti", ".tb", NULL, ".tc0", - ".td", NULL, ".sv3264" - }; - - if ((19 >= aux->x_csect.x_smclas) + static const char * const names[] = + { + ".pr", ".ro", ".db", ".tc", ".ua", ".rw", ".gl", ".xo", /* 0 - 7 */ + ".sv", ".bs", ".ds", ".uc", ".ti", ".tb", NULL, ".tc0", /* 8 - 15 */ + ".td", NULL, ".sv3264", NULL, ".tl", ".ul", ".te" + }; + + if ((aux->x_csect.x_smclas < ARRAY_SIZE (names)) && (NULL != names[aux->x_csect.x_smclas])) { return_value = bfd_make_section_anyway |