mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
* ldlang.h (LANG_FOR_EACH_{INPUT,OUTPUT}_SECTION): Delete (unused)
GNU C specific macros. * emultempl/hppaosf.em (hppaosf_finish): Expand the only remaining call to LANG_FOR_EACH_INPUT_SECTION.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
Fri Feb 4 23:02:19 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
|
||||||
|
|
||||||
|
* ldlang.h (LANG_FOR_EACH_{INPUT,OUTPUT}_SECTION): Delete (unused)
|
||||||
|
GNU C specific macros.
|
||||||
|
|
||||||
|
* emultempl/hppaosf.em (hppaosf_finish): Expand the only remaining
|
||||||
|
call to LANG_FOR_EACH_INPUT_SECTION.
|
||||||
|
|
||||||
Fri Feb 4 16:26:08 1994 David J. Mackenzie (djm@thepub.cygnus.com)
|
Fri Feb 4 16:26:08 1994 David J. Mackenzie (djm@thepub.cygnus.com)
|
||||||
|
|
||||||
* ldmisc.c (ldmalloc, xmalloc, ldrealloc, xrealloc): Functions
|
* ldmisc.c (ldmalloc, xmalloc, ldrealloc, xrealloc): Functions
|
||||||
|
@ -103,41 +103,49 @@ hppaosf_finish()
|
|||||||
if (link_info.relocateable == false)
|
if (link_info.relocateable == false)
|
||||||
{
|
{
|
||||||
/* check for needed stubs */
|
/* check for needed stubs */
|
||||||
LANG_FOR_EACH_INPUT_SECTION
|
extern lang_statement_list_type file_chain;
|
||||||
(statement, abfd, section,
|
lang_input_statement_type *statement;
|
||||||
(
|
|
||||||
{
|
|
||||||
int new_sym_cnt = 0;
|
|
||||||
int i,j;
|
|
||||||
asymbol *syms = hppa_look_for_stubs_in_section (stub_file->the_bfd,
|
|
||||||
abfd,
|
|
||||||
output_bfd,
|
|
||||||
section,
|
|
||||||
statement->asymbols,
|
|
||||||
&new_sym_cnt,
|
|
||||||
&link_info);
|
|
||||||
|
|
||||||
if ( (new_sym_cnt > 0) && syms )
|
for (statement = (lang_input_statement_type *)file_chain.head;
|
||||||
{
|
statement != (lang_input_statement_type *)NULL;
|
||||||
struct symbol_cache_entry **old_asymbols = stub_file->asymbols;
|
statement = (lang_input_statement_type *)statement->next)
|
||||||
|
{
|
||||||
|
asection *section;
|
||||||
|
bfd *abfd = statement->the_bfd;
|
||||||
|
for (section = abfd->sections;
|
||||||
|
section != (asection *)NULL;
|
||||||
|
section = section ->next)
|
||||||
|
{
|
||||||
|
int new_sym_cnt = 0;
|
||||||
|
int i,j;
|
||||||
|
asymbol *syms;
|
||||||
|
|
||||||
stub_file->asymbols = ldmalloc((stub_file->symbol_count + new_sym_cnt) * sizeof(asymbol *));
|
syms = hppa_look_for_stubs_in_section (stub_file->the_bfd,
|
||||||
|
abfd,
|
||||||
|
output_bfd,
|
||||||
|
section,
|
||||||
|
statement->asymbols,
|
||||||
|
&new_sym_cnt,
|
||||||
|
&link_info);
|
||||||
|
|
||||||
for ( j = 0; j < stub_file->symbol_count; j++ )
|
if ( (new_sym_cnt > 0) && syms )
|
||||||
stub_file->asymbols[j] = old_asymbols[j];
|
{
|
||||||
|
struct symbol_cache_entry **old_asymbols;
|
||||||
|
|
||||||
|
old_asymbols = stub_file->asymbols;
|
||||||
|
|
||||||
|
stub_file->asymbols = ldmalloc((stub_file->symbol_count + new_sym_cnt) * sizeof(asymbol *));
|
||||||
|
|
||||||
|
for ( j = 0; j < stub_file->symbol_count; j++ )
|
||||||
|
stub_file->asymbols[j] = old_asymbols[j];
|
||||||
|
|
||||||
for ( j = 0, i = stub_file->symbol_count; j < new_sym_cnt; j++, i++ )
|
for ( j = 0, i = stub_file->symbol_count; j < new_sym_cnt; j++, i++ )
|
||||||
stub_file->asymbols[i] = &syms[j];
|
stub_file->asymbols[i] = &syms[j];
|
||||||
|
|
||||||
stub_file->symbol_count += new_sym_cnt;
|
stub_file->symbol_count += new_sym_cnt;
|
||||||
/* Now, attach the contents of the new linker stub(s) */
|
}
|
||||||
/* to the linker stub input section. */
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
/* Add a statement to get the linker stubs included in the output */
|
/* Add a statement to get the linker stubs included in the output */
|
||||||
lang_add_wild(".hppa_linker_stubs",NULL);
|
lang_add_wild(".hppa_linker_stubs",NULL);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user