diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-07-13 14:46:06 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-07-13 14:46:06 +0000 |
commit | c3246d9b00ee6626c79eced991d3b669aa4846ab (patch) | |
tree | c848743cf5324d8649724550d7b3d6449f5bedaf /bfd/srec.c | |
parent | ac7530a8958a2d871bf5967b58f7e3283883d567 (diff) | |
download | gdb-c3246d9b00ee6626c79eced991d3b669aa4846ab.zip gdb-c3246d9b00ee6626c79eced991d3b669aa4846ab.tar.gz gdb-c3246d9b00ee6626c79eced991d3b669aa4846ab.tar.bz2 |
* targets.c (bfd_target): Add fields _read_minisymbols and
_minisymbol_to_symbol.
(BFD_JUMP_TABLE_SYMBOLS): Add _read_minisymbols and
_minisymbol_to_symbol.
(bfd_read_minisymbols): Define.
(bfd_minisymbol_to_symbol): Define.
* syms.c (_bfd_generic_read_minisymbols): Define.
(_bfd_generic_minisymbol_to_symbol): Define.
* libbfd-in.h (_bfd_nosymbols_read_minisymbols): Define.
(_bfd_nosymbols_minisymbol_to_symbol): Define.
(_bfd_generic_read_minisymbols): Declare.
(_bfd_generic_minisymbol_to_symbol): Declare.
* bfd-in2.h: Rebuild.
* libbfd.h: Rebuild.
* aoutx.h (MINISYM_THRESHOLD): Define.
(NAME(aout,read_minisymbols)): New function.
(NAME(aout,minisymbol_to_symbol)): New function.
* libaout.h (NAME(aout,read_minisymbols)): Declare.
(NAME(aout,minisymbol_to_symbol)): Declare.
* aout-target.h (MY_read_minisymbols): Define.
(MY_minisymbol_to_symbol): Define.
* All targets: Define read_minisymbols and minisymbol_to_symbol.
PR 5332.
Diffstat (limited to 'bfd/srec.c')
-rw-r--r-- | bfd/srec.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* SUBSECTION @@ -778,8 +778,7 @@ srec_get_section_contents (abfd, section, location, offset, count) return true; } -/* we have to save up all the Srecords for a splurge before output, - also remember */ +/* we have to save up all the Srecords for a splurge before output */ static boolean srec_set_section_contents (abfd, section, location, offset, bytes_to_do) @@ -800,7 +799,8 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do) return false; } - if ((section->flags & SEC_ALLOC) + if (bytes_to_do + && (section->flags & SEC_ALLOC) && (section->flags & SEC_LOAD)) { bfd_byte *data = (bfd_byte *) bfd_alloc (abfd, bytes_to_do); @@ -811,11 +811,11 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do) } memcpy ((PTR) data, location, bytes_to_do); - if ((section->lma + offset + bytes_to_do) <= 0xffff) + if ((section->lma + offset + bytes_to_do - 1) <= 0xffff) { } - else if ((section->lma + offset + bytes_to_do) <= 0xffffff + else if ((section->lma + offset + bytes_to_do - 1) <= 0xffffff && tdata->type < 2) { tdata->type = 2; @@ -1212,6 +1212,8 @@ srec_print_symbol (ignore_abfd, afile, symbol, how) #define srec_get_lineno _bfd_nosymbols_get_lineno #define srec_find_nearest_line _bfd_nosymbols_find_nearest_line #define srec_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol +#define srec_read_minisymbols _bfd_generic_read_minisymbols +#define srec_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol #define srec_get_reloc_upper_bound \ ((long (*) PARAMS ((bfd *, asection *))) bfd_0l) @@ -1227,6 +1229,7 @@ srec_print_symbol (ignore_abfd, afile, symbol, how) #define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols #define srec_bfd_final_link _bfd_generic_final_link +#define srec_bfd_link_split_section _bfd_generic_link_split_section const bfd_target srec_vec = { |