diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-03-22 16:44:21 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-03-22 16:44:21 +0000 |
commit | c7a89bde9b712899795468ba575bd374f7a28c04 (patch) | |
tree | 5dd15a9c840aa78ec6a85da6cc3803aee44e3d40 /gas/read.c | |
parent | 5ba7c0bee1a42f4b9ba600dad37adedb3569c079 (diff) | |
download | gdb-c7a89bde9b712899795468ba575bd374f7a28c04.zip gdb-c7a89bde9b712899795468ba575bd374f7a28c04.tar.gz gdb-c7a89bde9b712899795468ba575bd374f7a28c04.tar.bz2 |
* as.h (strdup): Don't declare.
* stabs.c: Include libiberty.h
(get_stab_string_offset): Use xstrdup rather than strdup.
(s_stab_generic): Likewise.
* as.c (parse_args): Likewise.
* read.c (s_mri_sect): Likewise.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 24 |
1 files changed, 10 insertions, 14 deletions
@@ -2108,9 +2108,9 @@ s_org (ignore) /* Handle parsing for the MRI SECT/SECTION pseudo-op. This should be called by the obj-format routine which handles section changing when in MRI mode. It will create a new section, and return it. It - will set *TYPE to the section type: one of '\0' (unspecified), 'C' - (code), 'D' (data), 'M' (mixed), or 'R' (romable). If - BFD_ASSEMBLER is defined, the flags will be set in the section. */ + will set *TYPE to the section type: one of 'C' (code), 'D' (data), + 'M' (mixed), or 'R' (romable). If BFD_ASSEMBLER is defined, the + flags will be set in the section. */ void s_mri_sect (type) @@ -2138,9 +2138,7 @@ s_mri_sect (type) *input_line_pointer = '\0'; } - name = strdup (name); - if (name == NULL) - as_fatal ("virtual memory exhausted"); + name = xstrdup (name); *input_line_pointer = c; @@ -2155,7 +2153,7 @@ s_mri_sect (type) record_alignment (seg, align); } - *type = '\0'; + *type = 'C'; if (*input_line_pointer == ',') { c = *++input_line_pointer; @@ -2172,11 +2170,11 @@ s_mri_sect (type) flags = SEC_NO_FLAGS; if (*type == 'C') - flags = SEC_CODE; - else if (*type == 'D') - flags = SEC_DATA; + flags = SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE; + else if (*type == 'D' || *type == 'M') + flags = SEC_ALLOC | SEC_LOAD | SEC_DATA; else if (*type == 'R') - flags = SEC_ROM; + flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_READONLY | SEC_ROM; if (flags != SEC_NO_FLAGS) { if (! bfd_set_section_flags (stdoutput, seg, flags)) @@ -2206,9 +2204,7 @@ s_mri_sect (type) name = input_line_pointer; c = get_symbol_end (); - name = strdup (name); - if (name == NULL) - as_fatal ("virtual memory exhausted"); + name = xstrdup (name); *input_line_pointer = c; |