mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2031,45 +2045,55 @@ symbolS *symbol_rootP)
|
|||||||
|
|
||||||
static void DEFUN_VOID(obj_coff_lcomm)
|
static void DEFUN_VOID(obj_coff_lcomm)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
char c;
|
char c;
|
||||||
int temp;
|
int temp;
|
||||||
char *p;
|
char *p;
|
||||||
unsigned long vma;
|
unsigned long vma;
|
||||||
|
|
||||||
symbolS *symbolP;
|
symbolS *symbolP;
|
||||||
name = input_line_pointer;
|
name = input_line_pointer;
|
||||||
|
|
||||||
|
|
||||||
|
c = get_symbol_end();
|
||||||
|
p = input_line_pointer;
|
||||||
|
*p = c;
|
||||||
|
SKIP_WHITESPACE();
|
||||||
|
if (*input_line_pointer != ',') {
|
||||||
|
as_bad("Expected comma after name");
|
||||||
|
ignore_rest_of_line();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (*input_line_pointer == '\n') {
|
||||||
|
as_bad("Missing size expression");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
input_line_pointer++;
|
||||||
|
if ((temp = get_absolute_expression ()) < 0) {
|
||||||
|
as_warn("lcomm length (%d.) <0! Ignored.", temp);
|
||||||
|
ignore_rest_of_line();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
*p = 0;
|
||||||
|
|
||||||
c = get_symbol_end();
|
{
|
||||||
p = input_line_pointer;
|
/* Allocate zero static local data in the .data section now
|
||||||
*p = c;
|
instead of the bss section as a symbol with a value */
|
||||||
SKIP_WHITESPACE();
|
char *x;
|
||||||
if (*input_line_pointer != ',') {
|
segT oldseg = now_seg;
|
||||||
as_bad("Expected comma after name");
|
int oldsubseg = now_subseg;
|
||||||
ignore_rest_of_line();
|
|
||||||
return;
|
subseg_new(SEG_DATA, 10);
|
||||||
}
|
colon(name);
|
||||||
if (*input_line_pointer == '\n') {
|
frag_align(2,0);
|
||||||
as_bad("Missing size expression");
|
record_alignment(SEG_DATA, 4);
|
||||||
return;
|
x = frag_var (rs_fill, 1, 1, (relax_substateT)0, (symbolS *)0,
|
||||||
}
|
temp, (char *)0);
|
||||||
input_line_pointer++;
|
* x= 0;
|
||||||
if ((temp = get_absolute_expression ()) < 0) {
|
|
||||||
as_warn("lcomm length (%d.) <0! Ignored.", temp);
|
subseg_new(oldseg, oldsubseg);
|
||||||
ignore_rest_of_line();
|
}
|
||||||
return;
|
demand_empty_rest_of_line();
|
||||||
}
|
|
||||||
*p = 0;
|
|
||||||
symbolP = symbol_find_or_make(name);
|
|
||||||
vma = segment_info[SEG_E2].scnhdr.s_size;
|
|
||||||
vma += relax_align(vma, MIN(8, temp));
|
|
||||||
S_SET_VALUE(symbolP,vma);
|
|
||||||
S_SET_SEGMENT(symbolP, SEG_E2);
|
|
||||||
segment_info[SEG_E2].scnhdr.s_size = vma + temp;
|
|
||||||
S_SET_STORAGE_CLASS(symbolP, C_STAT);
|
|
||||||
demand_empty_rest_of_line();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DEFUN(fixup_mdeps,(frags),
|
static void DEFUN(fixup_mdeps,(frags),
|
||||||
|
Reference in New Issue
Block a user