URL
https://opencores.org/ocsvn/zipcpu/zipcpu/trunk
Subversion Repositories zipcpu
Compare Revisions
- This comparison shows the changes necessary to convert path
/zipcpu
- from Rev 112 to Rev 113
- ↔ Reverse comparison
Rev 112 → Rev 113
/trunk/sw/binutils-2.25.patch
231,8 → 231,8
|
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/elf32-zip.c binutils-2.25/bfd/elf32-zip.c |
--- binutils-2.25-original/bfd/elf32-zip.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/bfd/elf32-zip.c 2016-02-21 19:50:02.049904938 -0500 |
@@ -0,0 +1,1119 @@ |
+++ binutils-2.25/bfd/elf32-zip.c 2016-03-27 21:14:45.877301706 -0400 |
@@ -0,0 +1,1149 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
+// Filename: tc-zip.c |
668,7 → 668,37
+ return TRUE; |
+} |
+ |
+#define bfd_elf32_bfd_define_common_symbol zip_define_common_symbol |
+bfd_boolean |
+zip_define_common_symbol(bfd *output_bfd, |
+ struct bfd_link_info *info ATTRIBUTE_UNUSED, |
+ struct bfd_link_hash_entry *h) { |
+ bfd_vma size; |
+ asection *section; |
+ |
+ BFD_ASSERT (h != NULL && h->type == bfd_link_hash_common); |
+ |
+ size = h->u.c.size * bfd_octets_per_byte(output_bfd); |
+ section = h->u.c.p->section; |
+ h->u.c.p->alignment_power = 0; |
+ |
+ /* Change the symbol from common to defined. */ |
+ h->type = bfd_link_hash_defined; |
+ h->u.def.section = section; |
+ // section->size is in octets, not bytes |
+ h->u.def.value = section->size/bfd_octets_per_byte(output_bfd); |
+ |
+ /* Increase the size of the section. */ |
+ section->size += size; |
+ |
+ /* Make sure the section is allocated in memory, and make sure that |
+ it is no longer a common section. */ |
+ section->flags |= SEC_ALLOC; |
+ section->flags &= ~SEC_IS_COMMON; |
+ return TRUE; |
+} |
+ |
+ |
+// Zip Defines |
+#define TARGET_BIG_SYM zip_elf32_vec |
+#define TARGET_BIG_NAME "elf32-zip" |
2076,6 → 2106,19
elf32.c \ |
elflink.c \ |
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 |
@@ -794,8 +794,7 @@ |
if (secinfo->first_str == NULL) |
return TRUE; |
|
- /* FIXME: octets_per_byte. */ |
- pos = sec->output_section->filepos + sec->output_offset; |
+ pos = sec->output_section->filepos + sec->output_offset * bfd_octets_per_byte(output_bfd); |
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0) |
return FALSE; |
|
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-02-21 19:51:11.949429002 -0500 |
2332,7 → 2375,7
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-03-05 20:55:57.053815009 -0500 |
+++ binutils-2.25/gas/config/tc-zip.c 2016-03-27 21:55:58.208988917 -0400 |
@@ -0,0 +1,2258 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
2399,8 → 2442,8
+ |
+void md_begin(void) { |
+ vliw_mergable = 0; |
+ record_alignment(text_section, 2); |
+ record_alignment(data_section, 2); |
+ // record_alignment(text_section, 2); |
+ // record_alignment(data_section, 2); |
+ lex_type['('] = lex_type['A']; |
+} |
+ |
4932,7 → 4975,7
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xtensa-relax.Tpo $(DEPDIR)/xtensa-relax.Po |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/read.c binutils-2.25/gas/read.c |
--- binutils-2.25-original/gas/read.c 2014-10-14 03:32:03.000000000 -0400 |
+++ binutils-2.25/gas/read.c 2016-02-18 19:38:41.652350159 -0500 |
+++ binutils-2.25/gas/read.c 2016-03-27 22:09:08.890860654 -0400 |
@@ -684,7 +684,8 @@ |
/* We do this every time rather than just in s_bundle_align_mode |
so that we catch any affected section without needing hooks all |
4972,6 → 5015,42
} |
|
/* Handle the .align pseudo-op. A positive ARG is a default alignment |
@@ -3336,7 +3341,7 @@ |
offsetT i; |
|
if (mult == 0) |
- mult = 1; |
+ mult = OCTETS_PER_BYTE; |
bytes = mult * exp.X_add_number; |
for (i = 0; i < exp.X_add_number; i++) |
emit_expr (&val, mult); |
@@ -3354,7 +3359,7 @@ |
repeat = exp.X_add_number; |
if (mult) |
repeat *= mult; |
- bytes = repeat; |
+ bytes = repeat * OCTETS_PER_BYTE; |
if (repeat <= 0) |
{ |
if (!flag_mri) |
@@ -3382,7 +3387,7 @@ |
} |
|
if (!need_pass_2) |
- p = frag_var (rs_fill, 1, 1, (relax_substateT) 0, (symbolS *) 0, |
+ p = frag_var (rs_fill, OCTETS_PER_BYTE, OCTETS_PER_BYTE, (relax_substateT) 0, (symbolS *) 0, |
(offsetT) repeat, (char *) 0); |
} |
else |
@@ -3400,7 +3405,7 @@ |
} |
|
if (!need_pass_2) |
- p = frag_var (rs_space, 1, 1, (relax_substateT) 0, |
+ p = frag_var (rs_space, OCTETS_PER_BYTE, OCTETS_PER_BYTE, (relax_substateT) 0, |
make_expr_symbol (&exp), (offsetT) 0, (char *) 0); |
} |
|
@@ -4927,6 +4932,8 @@ |
while (!(((value == 0) && ((byte & 0x40) == 0)) |
|| ((value == -1) && ((byte & 0x40) != 0)))); |
5694,6 → 5773,46
+COMMONPAGESIZE=0x1000 |
+EMBEDDED=yes |
+ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/ld/ldlang.c binutils-2.25/ld/ldlang.c |
--- binutils-2.25-original/ld/ldlang.c 2014-10-15 03:43:36.000000000 -0400 |
+++ binutils-2.25/ld/ldlang.c 2016-03-27 22:02:43.913871100 -0400 |
@@ -4007,7 +4007,7 @@ |
++len; |
} |
|
- minfo ("0x%V %W", section->vma, section->size); |
+ minfo ("0x%V %W", section->vma, TO_ADDR(section->size)); |
|
if (section->vma != section->lma) |
minfo (_(" load address 0x%V"), section->lma); |
@@ -4385,7 +4385,8 @@ |
addr = s->output_offset; |
if (s->output_section != NULL) |
addr += s->output_section->vma; |
- minfo ("0x%V %W ", addr, (bfd_vma) s->size); |
+ // FIXME : Need to get rid of these fills |
+ minfo ("0x%V %W xx", addr, (bfd_vma) TO_ADDR(s->size)); |
|
if (s->fill->size != 0) |
{ |
@@ -5064,7 +5065,7 @@ |
create overlapping LMAs. */ |
if (dot < last->vma |
&& os->bfd_section->size != 0 |
- && dot + os->bfd_section->size <= last->vma) |
+ && dot + TO_ADDR(os->bfd_section->size) <= last->vma) |
{ |
/* If dot moved backwards then leave lma equal to |
vma. This is the old default lma, which might |
@@ -5081,7 +5082,7 @@ |
/* If this is an overlay, set the current lma to that |
at the end of the previous section. */ |
if (os->sectype == overlay_section) |
- lma = last->lma + last->size; |
+ lma = last->lma + TO_ADDR(last->size); |
|
/* Otherwise, keep the same lma to vma relationship |
as the previous section. */ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/ld/Makefile.am binutils-2.25/ld/Makefile.am |
--- binutils-2.25-original/ld/Makefile.am 2014-10-14 03:32:04.000000000 -0400 |
+++ binutils-2.25/ld/Makefile.am 2016-02-04 21:12:13.355418158 -0500 |
/trunk/sw/Makefile
100,7 → 100,7
|
.PHONY: gcc |
gcc: gcc-5.3.0-zip |
bash -c "if [[ ! -e $(BUILDGCCD) ]]; then gcc-script.sh; fi" |
bash -c "if [[ ! -e $(BUILDGCCD) ]]; then bash gcc-script.sh; fi" |
$(MAKE) --no-print-directory --directory=$(BUILDGCCD)/gcc |
|
.PHONY: gcc-install |