This commit is contained in:
Steve Chamberlain
1991-04-17 23:19:27 +00:00
parent 8ab76aa732
commit 301dfc71d4
5 changed files with 412 additions and 365 deletions

View File

@ -2336,9 +2336,14 @@ coff_slurp_reloc_table(abfd, asect, symbols)
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) {
if (ptr->the_bfd == abfd
&& ptr->section != (asection *) NULL
&& ((ptr->flags & BSF_OLD_COMMON)== 0))
{
cache_ptr->addend = -(ptr->section->vma + ptr->value);
}
else {

File diff suppressed because it is too large Load Diff

View File

@ -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;
}

View File

@ -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 */

View File

@ -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,