mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 21:41:47 +08:00
Tue Sep 22 13:02:07 1992 Sean Eric Fagan (sef@cygnus.com)
* obj-coffbfd.c (do_relocs_for,fill_section): now allocate all sections starting from zero, rather than making them consecutive. This makes subsequent reloc calculations easier, esp if the object format doesn't understand addends. (obj_coff_lcomm): (maybe temporarily) allocate lcomm in .data rather than in .bss. It seems that some tools can't cope with a non-zero sized bss before linkage.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
Tue Sep 22 13:02:07 1992 Sean Eric Fagan (sef@cygnus.com)
|
||||||
|
|
||||||
|
* obj-coffbfd.c (do_relocs_for,fill_section): now allocate all
|
||||||
|
sections starting from zero, rather than making them consecutive.
|
||||||
|
This makes subsequent reloc calculations easier, esp if the object
|
||||||
|
format doesn't understand addends. (obj_coff_lcomm): (maybe temporarily)
|
||||||
|
allocate lcomm in .data rather than in .bss. It seems that some
|
||||||
|
tools can't cope with a non-zero sized bss before linkage.
|
||||||
|
|
||||||
Tue Sep 22 15:10:51 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
|
Tue Sep 22 15:10:51 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
|
||||||
|
|
||||||
* tc-m68k.c: Replace "enum m68k_architecture" with "int"
|
* tc-m68k.c: Replace "enum m68k_architecture" with "int"
|
||||||
|
@ -436,7 +436,13 @@ void DEFUN(do_relocs_for,(abfd, file_cursor),
|
|||||||
*file_cursor += external_reloc_size;
|
*file_cursor += external_reloc_size;
|
||||||
free( external_reloc_vec);
|
free( external_reloc_vec);
|
||||||
}
|
}
|
||||||
|
#if OLDWAY
|
||||||
|
This should work, but causes problems with addends in relocs.
|
||||||
|
Disable it for the moment
|
||||||
addr += segment_info[idx].scnhdr.s_size;
|
addr += segment_info[idx].scnhdr.s_size;
|
||||||
|
#else
|
||||||
|
addr = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -544,7 +550,15 @@ static void DEFUN(fill_section,(abfd, filehdr, file_cursor),
|
|||||||
free(buffer);
|
free(buffer);
|
||||||
|
|
||||||
*file_cursor += s->s_size;
|
*file_cursor += s->s_size;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
This should work, but causes problems with addends in relocs.
|
||||||
|
Disable it for the moment
|
||||||
|
|
||||||
paddr += s->s_size;
|
paddr += s->s_size;
|
||||||
|
#else
|
||||||
|
paddr = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2041,7 +2055,6 @@ static void DEFUN_VOID(obj_coff_lcomm)
|
|||||||
name = input_line_pointer;
|
name = input_line_pointer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
c = get_symbol_end();
|
c = get_symbol_end();
|
||||||
p = input_line_pointer;
|
p = input_line_pointer;
|
||||||
*p = c;
|
*p = c;
|
||||||
@ -2062,13 +2075,24 @@ static void DEFUN_VOID(obj_coff_lcomm)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*p = 0;
|
*p = 0;
|
||||||
symbolP = symbol_find_or_make(name);
|
|
||||||
vma = segment_info[SEG_E2].scnhdr.s_size;
|
{
|
||||||
vma += relax_align(vma, MIN(8, temp));
|
/* Allocate zero static local data in the .data section now
|
||||||
S_SET_VALUE(symbolP,vma);
|
instead of the bss section as a symbol with a value */
|
||||||
S_SET_SEGMENT(symbolP, SEG_E2);
|
char *x;
|
||||||
segment_info[SEG_E2].scnhdr.s_size = vma + temp;
|
segT oldseg = now_seg;
|
||||||
S_SET_STORAGE_CLASS(symbolP, C_STAT);
|
int oldsubseg = now_subseg;
|
||||||
|
|
||||||
|
subseg_new(SEG_DATA, 10);
|
||||||
|
colon(name);
|
||||||
|
frag_align(2,0);
|
||||||
|
record_alignment(SEG_DATA, 4);
|
||||||
|
x = frag_var (rs_fill, 1, 1, (relax_substateT)0, (symbolS *)0,
|
||||||
|
temp, (char *)0);
|
||||||
|
* x= 0;
|
||||||
|
|
||||||
|
subseg_new(oldseg, oldsubseg);
|
||||||
|
}
|
||||||
demand_empty_rest_of_line();
|
demand_empty_rest_of_line();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user