mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
* config/tc-hppa.c (pa_import): Correctly handle importing of an
already defined symbol.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Thu Mar 17 13:36:09 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
|
||||||
|
|
||||||
|
* config/tc-hppa.c (pa_import): Correctly handle importing of an
|
||||||
|
already defined symbol.
|
||||||
|
|
||||||
Wed Mar 16 17:11:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
Wed Mar 16 17:11:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||||
|
|
||||||
* config/tc-mips.c (mips_ip): Only accept overly large values for
|
* config/tc-mips.c (mips_ip): Only accept overly large values for
|
||||||
|
@ -4758,27 +4758,41 @@ pa_import (unused)
|
|||||||
name = input_line_pointer;
|
name = input_line_pointer;
|
||||||
c = get_symbol_end ();
|
c = get_symbol_end ();
|
||||||
|
|
||||||
symbol = symbol_find_or_make (name);
|
symbol = symbol_find (name);
|
||||||
p = input_line_pointer;
|
/* Ugh. We might be importing a symbol defined earlier in the file,
|
||||||
*p = c;
|
in which case all the code below will really screw things up
|
||||||
|
(set the wrong segment, symbol flags & type, etc). */
|
||||||
if (!is_end_of_statement ())
|
if (symbol == NULL || !S_IS_DEFINED (symbol))
|
||||||
{
|
{
|
||||||
input_line_pointer++;
|
symbol = symbol_find_or_make (name);
|
||||||
pa_type_args (symbol, 0);
|
p = input_line_pointer;
|
||||||
|
*p = c;
|
||||||
|
|
||||||
|
if (!is_end_of_statement ())
|
||||||
|
{
|
||||||
|
input_line_pointer++;
|
||||||
|
pa_type_args (symbol, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Sigh. To be compatable with the HP assembler and to help
|
||||||
|
poorly written assembly code, we assign a type based on
|
||||||
|
the the current segment. Note only BSF_FUNCTION really
|
||||||
|
matters, we do not need to set the full SYMBOL_TYPE_* info. */
|
||||||
|
if (now_seg == text_section)
|
||||||
|
symbol->bsym->flags |= BSF_FUNCTION;
|
||||||
|
|
||||||
|
/* If the section is undefined, then the symbol is undefined
|
||||||
|
Since this is an import, leave the section undefined. */
|
||||||
|
S_SET_SEGMENT (symbol, &bfd_und_section);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Sigh. To be compatable with the HP assembler and to help
|
/* The symbol was already defined. Just eat everything up to
|
||||||
poorly written assembly code, we assign a type based on
|
the end of the current statement. */
|
||||||
the the current segment. Note only BSF_FUNCTION really
|
while (!is_end_of_statement ())
|
||||||
matters, we do not need to set the full SYMBOL_TYPE_* info here. */
|
input_line_pointer++;
|
||||||
if (now_seg == text_section)
|
|
||||||
symbol->bsym->flags |= BSF_FUNCTION;
|
|
||||||
|
|
||||||
/* If the section is undefined, then the symbol is undefined
|
|
||||||
Since this is an import, leave the section undefined. */
|
|
||||||
S_SET_SEGMENT (symbol, &bfd_und_section);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
|
Reference in New Issue
Block a user