/*
* $Id$
- *
- * $Log$
- * Revision 1.3 1991/03/22 22:32:22 steve
- * *** empty log message ***
- *
- * Revision 1.2 1991/03/22 22:31:37 steve
- * *** empty log message ***
- *
- * Revision 1.1.1.1 1991/03/21 21:29:05 gumby
- * Back from Intel with Steve
- *
- * Revision 1.1 1991/03/21 21:29:04 gumby
- * Initial revision
- *
- * Revision 1.2 1991/03/15 18:45:55 rich
- * foo
- *
- * Revision 1.1 1991/03/13 00:48:37 chrisb
- * Initial revision
- *
- * Revision 1.7 1991/03/10 19:15:03 sac
- * Took out the abort() which had been put in the wrong place
- * Updated the version #.
- *
- * Revision 1.6 1991/03/10 09:31:41 rich
- * Modified Files:
- * Makefile config.h ld-emul.c ld-emul.h ld-gld.c ld-gld960.c
- * ld-lnk960.c ld.h lddigest.c ldexp.c ldexp.h ldfile.c ldfile.h
- * ldgram.y ldinfo.h ldlang.c ldlang.h ldlex.h ldlex.l ldmain.c
- * ldmain.h ldmisc.c ldmisc.h ldsym.c ldsym.h ldversion.c
- * ldversion.h ldwarn.h ldwrite.c ldwrite.h y.tab.h
- *
- * As of this round of changes, ld now builds on all hosts of (Intel960)
- * interest and copy passes my copy test on big endian hosts again.
- *
- * Revision 1.5 1991/03/09 03:25:08 sac
- * Added support for LONG, SHORT and BYTE keywords in scripts
- *
- * Revision 1.4 1991/03/06 21:59:34 sac
- * Completed G++ support
- *
- * Revision 1.3 1991/03/06 02:29:52 sac
- * Added support for partial linking.
- *
- * Revision 1.2 1991/02/22 17:15:11 sac
- * Added RCS keywords and copyrights
- *
*/
/*
symbols)
bfd *input_bfd;
asection *input_section;
-void *data;
+PTR data;
asymbol **symbols;
{
static asymbol *error_symbol = (asymbol *)NULL;
s);
break;
case bfd_reloc_outofrange:
- info("%B:%s relocation address out of range %T (%x)\n",
+ info("%B:%s relocation address out of range %T (%V)\n",
input_bfd,
input_section->name,
s,
-void *data_area;
+PTR data_area;
static void
copy_and_relocate(statement)
{
switch (statement->header.type) {
case lang_fill_statement_enum:
- {
+ {
#if 0
bfd_byte play_area[SHORT_SIZE];
unsigned int i;
}
break;
case lang_input_section_enum:
- {
-
- asection *i = statement->input_section.section;
- asection *output_section = i->output_section;
- lang_input_statement_type *ifile = statement->input_section.ifile;
- bfd *inbfd = ifile->the_bfd;
- if (output_section->flags & SEC_LOAD && i->size != 0)
- {
- if(bfd_get_section_contents(inbfd,
- i,
- data_area,
- 0L,
- i->size) == false)
- {
- info("%F%B error reading section contents %E\n",
- inbfd);
- }
- perform_relocation (inbfd, i, data_area, ifile->asymbols);
-
-
- if(bfd_set_section_contents(output_bfd,
- output_section,
- data_area,
- (file_ptr)i->output_offset,
- i->size) == false)
- {
- info("%F%B error writing section contents of %E\n",
- output_bfd);
- }
+ {
+
+ asection *i = statement->input_section.section;
+ asection *output_section = i->output_section;
+ lang_input_statement_type *ifile =
+ statement->input_section.ifile;
+ if (ifile->just_syms_flag == false) {
+ bfd *inbfd = ifile->the_bfd;
+
+ if (output_section->flags & SEC_LOAD && i->size != 0)
+ {
+ if(bfd_get_section_contents(inbfd,
+ i,
+ data_area,
+ 0L,
+ i->size) == false)
+ {
+ info("%F%B error reading section contents %E\n",
+ inbfd);
+ }
+ perform_relocation (inbfd, i, data_area, ifile->asymbols);
+
+
+ if(bfd_set_section_contents(output_bfd,
+ output_section,
+ data_area,
+ (file_ptr)i->output_offset,
+ i->size) == false)
+ {
+ info("%F%B error writing section contents of %E\n",
+ output_bfd);
+ }
+ }
}
- }
+
+ }
break;
- default:
+ default:
/* All the other ones fall through */
;
void
ldwrite ()
{
- data_area = (void*) ldmalloc(largest_section);
+ data_area = (PTR) ldmalloc(largest_section);
if (config.relocateable_output == true)
{
write_rel();