diff options
author | Ian Lance Taylor <ian@airs.com> | 1993-09-20 23:29:42 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1993-09-20 23:29:42 +0000 |
commit | 9bd0d6499c6f30e5a63661561e9860752d3c3b35 (patch) | |
tree | 56a5677b94ada2b67c67748a986cf9e279652c01 /gas | |
parent | 36d541b1c75637ae7b5eabac2d1b5be83ad2ff8b (diff) | |
download | gdb-9bd0d6499c6f30e5a63661561e9860752d3c3b35.zip gdb-9bd0d6499c6f30e5a63661561e9860752d3c3b35.tar.gz gdb-9bd0d6499c6f30e5a63661561e9860752d3c3b35.tar.bz2 |
* read.c (get_stab_string_offset): Make non-static. Make
arguments const. Don't align strings to 4 byte boundaries.
* read.h: Declare get_stab_string_offset.
* config/obj-elf.c (obj_elf_section): Set SEC_ALLOC as well as
SEC_LOAD for progbits section.
(obj_elf_init_stab_section): New function.
(adjust_stab_sections): Add casts to avoid warnings.
* config/obj-elf.h (INIT_STAB_SECTION): Call
obj_elf_init_stab_section.
(OBJ_PROCESS_STAB): Removed definition.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 15 | ||||
-rw-r--r-- | gas/config/obj-elf.c | 31 |
2 files changed, 42 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index dd0d3a5..0360ab5 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,16 @@ +Mon Sep 20 19:23:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * read.c (get_stab_string_offset): Make non-static. Make + arguments const. Don't align strings to 4 byte boundaries. + * read.h: Declare get_stab_string_offset. + * config/obj-elf.c (obj_elf_section): Set SEC_ALLOC as well as + SEC_LOAD for progbits section. + (obj_elf_init_stab_section): New function. + (adjust_stab_sections): Add casts to avoid warnings. + * config/obj-elf.h (INIT_STAB_SECTION): Call + obj_elf_init_stab_section. + (OBJ_PROCESS_STAB): Removed definition. + Fri Sep 17 18:12:34 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * config/obj-elf.h (S_GET_SIZE): Define. @@ -6,7 +19,7 @@ Fri Sep 17 18:12:34 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) Thu Sep 16 14:23:08 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - * tc.h: Declare tc_gen_reloc differently depending upong + * tc.h: Declare tc_gen_reloc differently depending upon RELOC_EXPANSION_POSSIBLE. * config/obj-elf.c (obj_elf_section): Only set flags when first creating the section. diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 603c707..86997bb 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -358,7 +358,7 @@ obj_elf_section (xxx) CHECK ("write", SEC_READONLY, 1); CHECK ("alloc", SEC_ALLOC | SEC_LOAD, 0); CHECK ("execinstr", SEC_CODE, 1); - CHECK ("progbits", SEC_LOAD, 1); + CHECK ("progbits", SEC_ALLOC | SEC_LOAD, 1); #undef CHECK p = input_line_pointer; @@ -714,6 +714,31 @@ obj_elf_ident (ignore) subseg_set (old_section, old_subsection); } +/* The first entry in a .stabs section is special. */ + +void +obj_elf_init_stab_section (seg) + segT seg; +{ + extern char *logical_input_file, *physical_input_file; + char *p; + const char *file; + unsigned int stroff; + + p = frag_more (12); + file = logical_input_file; + if (file == NULL) + file = physical_input_file; + if (file == NULL) + file = "UNKNOWN"; + stroff = get_stab_string_offset (file, segment_name (seg)); + know (stroff == 1); + md_number_to_chars (p, stroff, 4); + seg_info (seg)->stabu.p = p; +} + +/* Fill in the counts in the first entry in a .stabs section. */ + static void adjust_stab_sections (abfd, sec, xxx) bfd *abfd; @@ -743,8 +768,8 @@ adjust_stab_sections (abfd, sec, xxx) p = seg_info (sec)->stabu.p; assert (p != 0); - bfd_h_put_16 (abfd, (bfd_vma) nsyms, p + 6); - bfd_h_put_32 (abfd, (bfd_vma) strsz, p + 8); + bfd_h_put_16 (abfd, (bfd_vma) nsyms, (bfd_byte *) p + 6); + bfd_h_put_32 (abfd, (bfd_vma) strsz, (bfd_byte *) p + 8); } void |