URL
https://opencores.org/ocsvn/zipcpu/zipcpu/trunk
Subversion Repositories zipcpu
Compare Revisions
- This comparison shows the changes necessary to convert path
/zipcpu/trunk/sw
- from Rev 138 to Rev 141
- ↔ Reverse comparison
Rev 138 → Rev 141
/binutils-2.25.patch
1516,7 → 1516,7
+#endif |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/elf.c binutils-2.25/bfd/elf.c |
--- binutils-2.25-original/bfd/elf.c 2014-12-23 03:47:10.000000000 -0500 |
+++ binutils-2.25/bfd/elf.c 2016-02-21 18:53:19.020534440 -0500 |
+++ binutils-2.25/bfd/elf.c 2016-05-10 14:24:12.768317271 -0400 |
@@ -9945,6 +9945,10 @@ |
sym->st_value + addend); |
} |
1541,7 → 1541,7
} |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/elflink.c binutils-2.25/bfd/elflink.c |
--- binutils-2.25-original/bfd/elflink.c 2014-12-23 03:47:10.000000000 -0500 |
+++ binutils-2.25/bfd/elflink.c 2016-03-10 09:53:38.011710873 -0500 |
+++ binutils-2.25/bfd/elflink.c 2016-05-10 14:37:15.868226769 -0400 |
@@ -1348,7 +1348,7 @@ |
return FALSE; |
|
2241,7 → 2241,7
elfxx-sparc.c \ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/merge.c binutils-2.25/bfd/merge.c |
--- binutils-2.25-original/bfd/merge.c 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/bfd/merge.c 2016-03-26 21:00:07.454199674 -0400 |
+++ binutils-2.25/bfd/merge.c 2016-05-10 14:39:23.543555762 -0400 |
@@ -794,8 +794,7 @@ |
if (secinfo->first_str == NULL) |
return TRUE; |
2252,6 → 2252,67
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0) |
return FALSE; |
|
@@ -817,15 +816,16 @@ |
struct sec_merge_hash_entry *entry; |
unsigned char *p; |
asection *sec = *psec; |
+ bfd_vma offset_octets = offset * bfd_octets_per_byte(output_bfd); |
|
secinfo = (struct sec_merge_sec_info *) psecinfo; |
|
if (!secinfo) |
return offset; |
|
- if (offset >= sec->rawsize) |
+ if (offset_octets >= sec->rawsize) |
{ |
- if (offset > sec->rawsize) |
+ if (offset_octets > sec->rawsize) |
{ |
(*_bfd_error_handler) |
(_("%s: access beyond end of merged section (%ld)"), |
@@ -838,14 +838,14 @@ |
{ |
if (sec->entsize == 1) |
{ |
- p = secinfo->contents + offset - 1; |
+ p = secinfo->contents + offset_octets - 1; |
while (p >= secinfo->contents && *p) |
--p; |
++p; |
} |
else |
{ |
- p = secinfo->contents + (offset / sec->entsize) * sec->entsize; |
+ p = secinfo->contents + (offset_octets / sec->entsize) * sec->entsize; |
p -= sec->entsize; |
while (p >= secinfo->contents) |
{ |
@@ -863,7 +863,7 @@ |
} |
else |
{ |
- p = secinfo->contents + (offset / sec->entsize) * sec->entsize; |
+ p = secinfo->contents + (offset_octets / sec->entsize) * sec->entsize; |
} |
entry = sec_merge_hash_lookup (secinfo->htab, (char *) p, 0, FALSE); |
if (!entry) |
@@ -877,12 +877,13 @@ |
if (! secinfo->htab->first) |
abort (); |
entry = secinfo->htab->first; |
- p = (secinfo->contents + (offset / sec->entsize + 1) * sec->entsize |
+ p = (secinfo->contents + (offset_octets / sec->entsize + 1) * sec->entsize |
- entry->len); |
} |
|
*psec = entry->secinfo->sec; |
- return entry->u.index + (secinfo->contents + offset - p); |
+ return (entry->u.index + (secinfo->contents + offset_octets - p)) |
+ / bfd_octets_per_byte(output_bfd); |
} |
|
/* Tidy up when done. */ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/reloc.c binutils-2.25/bfd/reloc.c |
--- binutils-2.25-original/bfd/reloc.c 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/bfd/reloc.c 2016-04-21 10:10:44.122704152 -0400 |
2502,8 → 2563,8
optimize the copying in the simple case without using the |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/config/tc-zip.c binutils-2.25/gas/config/tc-zip.c |
--- binutils-2.25-original/gas/config/tc-zip.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/gas/config/tc-zip.c 2016-05-02 08:02:13.459987702 -0400 |
@@ -0,0 +1,2392 @@ |
+++ binutils-2.25/gas/config/tc-zip.c 2016-05-06 18:22:21.880847429 -0400 |
@@ -0,0 +1,2397 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
+// Filename: tc-zip.c |
3077,7 → 3138,7
+ err = NULL; |
+ } |
+ // printf("Found a register, %s -> %d\n", ptr+1, insn->i_breg); |
+ } else if ((*ptr)&&(*ptr == '+')) { |
+ } else if ((*ptr)&&((*ptr == '+')||(*ptr == '-'))) { |
+ if ((*lbl)&&(zip_parse_reg(lbl, &insn->i_breg) == NULL)) { |
+ // Register+Number |
+ // Skip to the end to process what follows |
3084,8 → 3145,7
+ *lbl = '\0'; // Label wasn't a symbol, so let's clear it |
+ } else { |
+ // Number/label+Register |
+ err = zip_parse_reg(ptr+1, &insn->i_breg); |
+ if (!err) { |
+ if (('+' == *ptr)&&((err = zip_parse_reg(ptr+1, &insn->i_breg))==NULL)) { |
+ // Let's skip to the end of the register |
+ ptr++; |
+ while(isalpha(*ptr)) |
3113,6 → 3173,11
+ // printf("Looking at a plus: %s\n", ptr); |
+ int sgn = (*ptr == '-')?1:0; |
+ |
+ if (sgn) { |
+ // printf("... I meant a minus\n"); |
+ ptr++; |
+ } |
+ |
+ ptr = zip_skip_white_spaces(ptr); |
+ if ('$' == *ptr) |
+ ptr = zip_skip_white_spaces(ptr+1); |
3119,8 → 3184,8
+ |
+ if ('+' == *ptr) |
+ ptr++; |
+ if ((sgn==0)&&('-' == *ptr)) { |
+ sgn = 1; |
+ if ('-' == *ptr) { |
+ sgn = !sgn; |
+ ptr++; |
+ } |
+ |
3127,8 → 3192,8
+ ptr = zip_skip_white_spaces(ptr); |
+ if ('$' == *ptr) |
+ ptr = zip_skip_white_spaces(ptr+1); |
+ if ((sgn==0)&&('-' == *ptr)) { |
+ sgn = 1; |
+ if ('-' == *ptr) { |
+ sgn = !sgn; |
+ ptr++; |
+ } |
+ |
3137,8 → 3202,9
+ |
+ // printf("Parsing #: %s\n", ptr); |
+ // While the following might make the most sense, |
+ // if (sgn) *--ptr = '-'; |
+ // the string is read-only, so we can't change it. |
+ // if (sgn) *--ptr = '-'; |
+ // Instead we do ... |
+ unsigned long v = (sgn)? |
+ -strtoul(ptr, &end, 0) : strtoul(ptr, &end, 0); |
+ insn->i_imm += v; |