Stuff
This commit is contained in:
parent
8ab76aa732
commit
301dfc71d4
5 changed files with 412 additions and 365 deletions
|
@ -2332,15 +2332,20 @@ coff_slurp_reloc_table(abfd, asect, symbols)
|
|||
ptr = *(cache_ptr->sym_ptr_ptr);
|
||||
cache_ptr->address = src->r_vaddr;
|
||||
/*
|
||||
The symbols definitions that we have read in have been
|
||||
relocated as if their sections started at 0. But the offsets
|
||||
refering to the symbols in the raw data have not been
|
||||
modified, so we have to have a negative addend to compensate.
|
||||
*/
|
||||
The symbols definitions that we have read in have been
|
||||
relocated as if their sections started at 0. But the offsets
|
||||
refering to the symbols in the raw data have not been
|
||||
modified, so we have to have a negative addend to compensate.
|
||||
|
||||
Note that symbols which used to be common must be left alone
|
||||
*/
|
||||
|
||||
if (ptr->the_bfd == abfd && ptr->section != (asection *) NULL) {
|
||||
cache_ptr->addend = -(ptr->section->vma + ptr->value);
|
||||
}
|
||||
if (ptr->the_bfd == abfd
|
||||
&& ptr->section != (asection *) NULL
|
||||
&& ((ptr->flags & BSF_OLD_COMMON)== 0))
|
||||
{
|
||||
cache_ptr->addend = -(ptr->section->vma + ptr->value);
|
||||
}
|
||||
else {
|
||||
cache_ptr->addend = 0;
|
||||
}
|
||||
|
|
746
bfd/ieee.c
746
bfd/ieee.c
File diff suppressed because it is too large
Load diff
|
@ -118,7 +118,7 @@ zalloc (size)
|
|||
char *ptr = (char *) malloc (size);
|
||||
|
||||
if ((ptr != NULL) && (size != 0))
|
||||
bzero (ptr, size);
|
||||
memset(ptr,0, size);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
|
|
@ -323,7 +323,7 @@ DEFUN(oasys_object_p,(abfd),
|
|||
while (loop) {
|
||||
oasys_record_union_type record;
|
||||
oasys_read_record(abfd, &record);
|
||||
if (record.header.length < sizeof(record.header))
|
||||
if ((size_t)record.header.length < (size_t)sizeof(record.header))
|
||||
goto fail;
|
||||
|
||||
|
||||
|
@ -807,7 +807,7 @@ DEFUN(oasys_write_header, (abfd),
|
|||
/* Create and write the header */
|
||||
oasys_header_record_type r;
|
||||
size_t length = strlen(abfd->filename);
|
||||
if (length > sizeof(r.module_name)) {
|
||||
if (length > (size_t)sizeof(r.module_name)) {
|
||||
length = sizeof(r.module_name);
|
||||
}
|
||||
|
||||
|
@ -881,7 +881,7 @@ DEFUN(oasys_write_data, (abfd),
|
|||
current_byte_index = 0;
|
||||
processed_data.relb = s->target_index | RELOCATION_TYPE_REL;
|
||||
|
||||
while (current_byte_index < s->size)
|
||||
while ((size_t)current_byte_index < s->size)
|
||||
{
|
||||
/* Scan forwards by eight bytes or however much is left and see if
|
||||
there are any relocations going on */
|
||||
|
|
|
@ -47,7 +47,7 @@ bfd_target *target_vector[] =
|
|||
&oasys_vec,
|
||||
&aout_little_vec,
|
||||
&aout_big_vec,
|
||||
/* &m88k_bcs_vec,*/
|
||||
&m88k_bcs_vec,
|
||||
&srec_vec,
|
||||
#endif /* GNU960 */
|
||||
&icoff_little_vec,
|
||||
|
|
Loading…
Reference in a new issue