Patch to binutils-2.6 for MS-DOS BFD backend
Bryan Ford
baford@snake.cs.utah.edu
Mon Feb 5 14:00:00 GMT 1996
Here's a very small patch to the i386-msdos target,
which fixes a bug in my code that only recently made itself known,
and cleans up a few other things a little...
Thanks!
Bryan
diff -crN binutils-2.6/bfd/i386msdos.c binutils-2.6-moss/bfd/i386msdos.c
*** binutils-2.6/bfd/i386msdos.c Mon Nov 6 03:07:21 1995
--- binutils-2.6-moss/bfd/i386msdos.c Wed Dec 20 12:45:55 1995
***************
*** 28,52 ****
#include "libaout.h"
#if 0
- typedef struct msdos_data_struct
- {
- #if 0
- srec_data_list_type *head;
- unsigned int type;
-
- int done_symbol_read;
- int count;
- asymbol *symbols;
- char *strings;
- int symbol_idx;
- int string_size;
- int string_idx;
- #endif
- }
- tdata_type;
- #endif
-
- #if 0
struct exe_header
{
unsigned short magic;
--- 28,33 ----
***************
*** 95,100 ****
--- 76,83 ----
/* Find the total size of the program on disk and in memory. */
for (sec = abfd->sections; sec != (asection *) NULL; sec = sec->next)
{
+ if (bfd_get_section_size_before_reloc (sec) == 0)
+ continue;
if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
{
bfd_vma sec_vma = bfd_get_section_vma (abfd, sec)
diff -crN binutils-2.6/ld/scripttempl/i386msdos.sc binutils-2.6-moss/ld/scripttempl/i386msdos.sc
*** binutils-2.6/ld/scripttempl/i386msdos.sc Thu Jun 22 20:05:04 1995
--- binutils-2.6-moss/ld/scripttempl/i386msdos.sc Sat Jan 27 22:35:00 1996
***************
*** 14,25 ****
${RELOCATING+etext = .;}
${RELOCATING+_etext = .;}
${RELOCATING+__etext = .;}
- ${PAD_TEXT+${RELOCATING+. = ${DATA_ALIGNMENT};}}
}
- ${RELOCATING+. = ${DATA_ALIGNMENT};}
- .rodata ${RELOCATING-0} : { *(.rodata) }
.data :
{
*(.data)
${CONSTRUCTING+CONSTRUCTORS}
${RELOCATING+edata = .;}
--- 14,23 ----
${RELOCATING+etext = .;}
${RELOCATING+_etext = .;}
${RELOCATING+__etext = .;}
}
.data :
{
+ *(.rodata)
*(.data)
${CONSTRUCTING+CONSTRUCTORS}
${RELOCATING+edata = .;}
Bryan
---
Bryan Ford baford@cs.utah.edu University of Utah, CSS
`finger baford@schirf.cs.utah.edu' for PGP key and other info.
More information about the Gas2
mailing list