URL
https://opencores.org/ocsvn/zipcpu/zipcpu/trunk
Subversion Repositories zipcpu
Compare Revisions
- This comparison shows the changes necessary to convert path
/zipcpu/trunk
- from Rev 102 to Rev 101
- ↔ Reverse comparison
Rev 102 → Rev 101
/sw/gcc-zippatch.patch
File deleted
/sw/binutils-2.25.patch
1,4 → 1,4
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/archures.c binutils-2.25/bfd/archures.c |
diff -Naur binutils-2.25-original/bfd/archures.c binutils-2.25/bfd/archures.c |
--- binutils-2.25-original/bfd/archures.c 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/bfd/archures.c 2016-02-04 21:12:06.471473513 -0500 |
@@ -496,6 +496,8 @@ |
26,9 → 26,9
#endif |
0 |
}; |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/bfd-in2.h binutils-2.25/bfd/bfd-in2.h |
diff -Naur binutils-2.25-original/bfd/bfd-in2.h binutils-2.25/bfd/bfd-in2.h |
--- binutils-2.25-original/bfd/bfd-in2.h 2014-11-04 04:54:41.000000000 -0500 |
+++ binutils-2.25/bfd/bfd-in2.h 2016-02-25 09:45:29.607954979 -0500 |
+++ binutils-2.25/bfd/bfd-in2.h 2016-02-04 21:12:06.475473480 -0500 |
@@ -2283,6 +2283,8 @@ |
#define bfd_mach_aarch64_ilp32 32 |
bfd_arch_nios2, |
63,7 → 63,7
BFD_RELOC_UNUSED }; |
|
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/config.bfd binutils-2.25/bfd/config.bfd |
diff -Naur binutils-2.25-original/bfd/config.bfd binutils-2.25/bfd/config.bfd |
--- binutils-2.25-original/bfd/config.bfd 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/bfd/config.bfd 2016-02-04 21:12:06.475473480 -0500 |
@@ -1692,6 +1692,10 @@ |
77,7 → 77,7
*-*-ieee*) |
targ_defvec=ieee_vec |
;; |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/configure binutils-2.25/bfd/configure |
diff -Naur binutils-2.25-original/bfd/configure binutils-2.25/bfd/configure |
--- binutils-2.25-original/bfd/configure 2014-12-23 09:22:04.000000000 -0500 |
+++ binutils-2.25/bfd/configure 2016-02-04 21:12:06.475473480 -0500 |
@@ -14178,6 +14178,10 @@ |
99,7 → 99,7
|
# These appear out of order in targets.c |
srec_vec) tb="$tb srec.lo" ;; |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/configure.ac binutils-2.25/bfd/configure.ac |
diff -Naur binutils-2.25-original/bfd/configure.ac binutils-2.25/bfd/configure.ac |
--- binutils-2.25-original/bfd/configure.ac 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/bfd/configure.ac 2016-02-04 21:12:06.487473383 -0500 |
@@ -488,6 +488,9 @@ |
120,7 → 120,7
|
# These appear out of order in targets.c |
srec_vec) tb="$tb srec.lo" ;; |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/cpu-zip.c binutils-2.25/bfd/cpu-zip.c |
diff -Naur binutils-2.25-original/bfd/cpu-zip.c binutils-2.25/bfd/cpu-zip.c |
--- binutils-2.25-original/bfd/cpu-zip.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/bfd/cpu-zip.c 2016-02-04 21:16:34.933317218 -0500 |
@@ -0,0 +1,65 @@ |
189,7 → 189,7
+ // the same family. |
+}; |
+ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/doc/archures.texi binutils-2.25/bfd/doc/archures.texi |
diff -Naur binutils-2.25-original/bfd/doc/archures.texi binutils-2.25/bfd/doc/archures.texi |
--- binutils-2.25-original/bfd/doc/archures.texi 2014-12-23 09:37:35.000000000 -0500 |
+++ binutils-2.25/bfd/doc/archures.texi 2016-02-04 21:12:06.487473383 -0500 |
@@ -463,6 +463,8 @@ |
201,7 → 201,7
bfd_arch_last |
@}; |
@end example |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/doc/reloc.texi binutils-2.25/bfd/doc/reloc.texi |
diff -Naur binutils-2.25-original/bfd/doc/reloc.texi binutils-2.25/bfd/doc/reloc.texi |
--- binutils-2.25-original/bfd/doc/reloc.texi 2014-12-23 09:37:35.000000000 -0500 |
+++ binutils-2.25/bfd/doc/reloc.texi 2016-02-04 21:12:06.487473383 -0500 |
@@ -3999,6 +3999,24 @@ |
229,10 → 229,10
|
@example |
|
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/elf32-zip.c binutils-2.25/bfd/elf32-zip.c |
diff -Naur 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-02-04 21:17:25.484912968 -0500 |
@@ -0,0 +1,521 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
+// Filename: tc-zip.c |
282,7 → 282,6
+zip_elf_pcrel_reloc (bfd *, arelent *, asymbol *, void *, |
+ asection *, bfd *, char **); |
+*/ |
+#define zip_relocation bfd_elf_generic_reloc |
+ |
+/* Forward declarations. */ |
+static reloc_howto_type zip_elf_howto_table [] = |
295,7 → 294,7
+ FALSE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_NONE", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0, /* src_mask */ |
309,8 → 308,8
+ 32, /* bitsize */ |
+ FALSE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_dont, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_VALUE", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0x00000000, /* src_mask */ |
317,6 → 316,21
+ 0xffffffff, /* dst_mask */ |
+ FALSE), /* pcrel_offset */ |
+ |
+ /* A 32 bit absolute relocation. */ |
+ HOWTO (R_ZIP_VALUE, /* type */ |
+ 0, /* rightshift */ |
+ 2, /* size (0 = byte, 1 = short, 2 = long) */ |
+ 32, /* bitsize */ |
+ FALSE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_VALUE", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0x00000000, /* src_mask */ |
+ 0xffffffff, /* dst_mask */ |
+ FALSE), /* pcrel_offset */ |
+ |
+ /* An 18 bit operand B immediate. */ |
+ HOWTO (R_ZIP_OPB_IMM, /* type */ |
+ 0, /* rightshift */ |
325,7 → 339,7
+ FALSE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_OPB_IMM", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0x00000000, /* src_mask */ |
340,7 → 354,7
+ FALSE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_OPB_OFFSET", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0x00000000, /* src_mask */ |
355,12 → 369,12
+ TRUE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_OPB_PCREL", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0x00000000, /* src_mask */ |
+ 0x0003ffff, /* dst_mask-14 bits */ |
+ FALSE), /* pcrel_offset */ |
+ TRUE), /* pcrel_offset */ |
+ |
+ /* An 18 bit operand B immediate, but relative to the Global Offset Table. */ |
+ HOWTO (R_ZIP_OPB_GOTREL, /* type */ |
367,15 → 381,15
+ 0, /* rightshift */ |
+ 2, /* size (0 = byte, 1 = short, 2 = long) */ |
+ 18, /* bitsize */ |
+ FALSE, /* pc_relative */ |
+ TRUE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_OPB_GOTREL", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0x00000000, /* src_mask */ |
+ 0x0003ffff, /* dst_mask-14 bits */ |
+ FALSE), /* pcrel_offset */ |
+ TRUE), /* pcrel_offset */ |
+ |
+ /* */ |
+ HOWTO (R_ZIP_MOV_OFFSET, /* type */ |
385,7 → 399,7
+ FALSE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_MOV_OFFSET", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0, /* src_mask */ |
400,7 → 414,7
+ FALSE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_MOV_PCREL", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0, /* src_mask */ |
415,7 → 429,7
+ FALSE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_MOV_GOTREL", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0, /* src_mask */ |
429,7 → 443,7
+ FALSE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_LDI", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0, /* src_mask */ |
443,7 → 457,7
+ FALSE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_LLO", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0, /* src_mask */ |
457,7 → 471,7
+ FALSE, /* pc_relative */ |
+ 0, /* bitpos */ |
+ complain_overflow_bitfield, /* complain_on_overflow */ |
+ zip_relocation, /* special_function */ |
+ bfd_elf_generic_reloc, /* special_function */ |
+ "R_ZIP_LHI", /* name */ |
+ FALSE, /* partial_inplace */ |
+ 0, /* src_mask */ |
491,8 → 505,10
+{ |
+ { BFD_RELOC_NONE, R_ZIP_NONE }, |
+ { BFD_RELOC_ZIP_VALUE, R_ZIP_VALUE }, |
+ { BFD_RELOC_32, R_ZIP_VALUE }, |
+ { BFD_RELOC_ZIP_OPB_IMM, R_ZIP_OPB_IMM }, |
+ { BFD_RELOC_ZIP_OPB_OFFSET, R_ZIP_OPB_OFFSET }, |
+ { BFD_RELOC_14, R_ZIP_OPB_OFFSET }, |
+ { BFD_RELOC_ZIP_OPB_PCREL, R_ZIP_OPB_PCREL }, |
+ { BFD_RELOC_ZIP_OPB_GOTREL, R_ZIP_OPB_GOTREL }, |
+ { BFD_RELOC_ZIP_MOV_OFFSET, R_ZIP_MOV_OFFSET }, |
500,10 → 516,9
+ { BFD_RELOC_ZIP_MOV_GOTREL, R_ZIP_MOV_GOTREL }, |
+ { BFD_RELOC_ZIP_LDI, R_ZIP_LDI }, |
+ { BFD_RELOC_ZIP_LLO, R_ZIP_LLO }, |
+ { BFD_RELOC_16, R_ZIP_LLO }, |
+ { BFD_RELOC_ZIP_LHI, R_ZIP_LHI }, |
+ { BFD_RELOC_14, R_ZIP_OPB_OFFSET }, |
+ { BFD_RELOC_16, R_ZIP_LLO }, |
+ { BFD_RELOC_32, R_ZIP_VALUE } |
+ { BFD_RELOC_ZIP_LHI, R_ZIP_BROKEN_BYTE } |
+}; |
+ |
+/* Given a BFD reloc code, return the howto structure for the corresponding |
618,11 → 633,9
+ continue; |
+ |
+ r = _bfd_final_link_relocate(howto, input_bfd, input_section, |
+ contents, rel->r_offset, |
+ relocation, |
+ contents, rel->r_offset, relocation, |
+ rel->r_addend); |
+ |
+ |
+ if (r != bfd_reloc_ok) |
+ { |
+ const char *msg = NULL; |
669,7 → 682,6
+} |
+ |
+ |
+// Zip Defines |
+#define TARGET_BIG_SYM zip_elf32_vec |
+#define TARGET_BIG_NAME "elf32-zip" |
+ |
697,1248 → 709,52
+#define elf_backend_relocate_section zip_elf_relocate_section |
+#define elf_backend_rela_normal 1 |
+ |
+// Default ELF32 defines from elf32-target.h that we would've normally included |
+// here, had we not been a OCTETS_PER_BYTE=4 machine |
+#include "elf32-target.h" |
+ |
+#define bfd_elf32_close_and_cleanup _bfd_elf_close_and_cleanup |
+#define bfd_elf32_bfd_free_cached_info _bfd_free_cached_info |
+#define bfd_elf32_get_section_contents _bfd_generic_get_section_contents |
+#define bfd_elf32_canonicalize_dynamic_symtab \ |
+ _bfd_elf_canonicalize_dynamic_symtab |
+#define bfd_elf32_get_synthetic_symtab _bfd_elf_get_synthetic_symtab |
+#define bfd_elf32_canonicalize_reloc _bfd_elf_canonicalize_reloc |
+#define bfd_elf32_find_nearest_line _bfd_elf_find_nearest_line |
+#define bfd_elf32_find_line _bfd_elf_find_line |
+#define bfd_elf32_find_inliner_info _bfd_elf_find_inliner_info |
+#define bfd_elf32_read_minisymbols _bfd_elf_read_minisymbols |
+#define bfd_elf32_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol |
+#define bfd_elf32_get_dynamic_symtab_upper_bound \ |
+ _bfd_elf_get_dynamic_symtab_upper_bound |
+#define bfd_elf32_get_lineno _bfd_elf_get_lineno |
+#define bfd_elf32_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound |
+#define bfd_elf32_get_symbol_info _bfd_elf_get_symbol_info |
+#define bfd_elf32_canonicalize_symtab _bfd_elf_canonicalize_symtab |
+#define bfd_elf32_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound |
+#define bfd_elf32_make_empty_symbol _bfd_elf_make_empty_symbol |
+#define bfd_elf32_new_section_hook _bfd_elf_new_section_hook |
+#define bfd_elf32_set_arch_mach _bfd_elf_set_arch_mach |
+#define bfd_elf32_set_section_contents _bfd_elf_set_section_contents |
+#define bfd_elf32_sizeof_headers _bfd_elf_sizeof_headers |
+#define bfd_elf32_write_object_contents _bfd_elf_write_object_contents |
+#define bfd_elf32_write_corefile_contents _bfd_elf_write_corefile_contents |
+// #define elf_backend_gc_mark_hook cris_elf_gc_mark_hook |
+// #define elf_backend_gc_sweep_hook cris_elf_gc_sweep_hook |
+// #define elf_backend_plt_sym_val cris_elf_plt_sym_val |
+// #define elf_backend_check_relocs cris_elf_check_relocs |
+// #define elf_backend_grok_prstatus cris_elf_grok_prstatus |
+// #define elf_backend_grok_psinfo cris_elf_grok_psinfo |
+// |
+// #define elf_backend_can_gc_sections 1 |
+// #define elf_backend_can_refcount 1 |
+ |
+#define bfd_elf32_get_section_contents_in_window \ |
+ _bfd_generic_get_section_contents_in_window |
+// #define elf_backend_object_p cris_elf_object_p |
+// #define elf_backend_final_write_processing cris_elf_final_write_processing |
+// #define bfd_elf32_bfd_print_private_bfd_data cris_elf_print_private_bfd_data |
+// #define bfd_elf32_bfd_merge_private_bfd_data cris_elf_merge_private_bfd_data |
+// #define bfd_elf32_bfd_copy_private_bfd_data cris_elf_copy_private_bfd_data |
+// |
+// #define bfd_elf32_bfd_link_hash_table_create elf_cris_link_hash_table_create |
+// #define elf_backend_adjust_dynamic_symbol elf_cris_adjust_dynamic_symbol |
+// #define elf_backend_copy_indirect_symbol elf_cris_copy_indirect_symbol |
+// #define elf_backend_size_dynamic_sections elf_cris_size_dynamic_sections |
+// #define elf_backend_init_index_section _bfd_elf_init_1_index_section |
+// #define elf_backend_finish_dynamic_symbol elf_cris_finish_dynamic_symbol |
+// #define elf_backend_finish_dynamic_sections elf_cris_finish_dynamic_sections |
+// #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections |
+// #define bfd_elf32_bfd_final_link bfd_elf_gc_common_final_link |
+// #define elf_backend_hide_symbol elf_cris_hide_symbol |
+// #define elf_backend_reloc_type_class elf_cris_reloc_type_class |
+ |
+#define elf_backend_can_refcount 0 |
+#define elf_backend_want_got_plt 0 |
+#define elf_backend_plt_readonly 0 |
+#define elf_backend_want_plt_sym 0 |
+#define elf_backend_plt_not_loaded 0 |
+#define elf_backend_plt_alignment 2 |
+#define elf_backend_want_dynbss 1 |
+#define elf_backend_want_p_paddr_set_to_zero 0 |
+#define elf_backend_default_execstack 1 |
+#define elf_backend_caches_rawsize 0 |
+#define elf_backend_stack_align 16 |
+// #define elf_backend_want_got_plt 1 |
+// #define elf_backend_plt_readonly 1 |
+// #define elf_backend_want_plt_sym 0 |
+// #define elf_backend_got_header_size 12 |
+// #define elf_backend_got_elt_size elf_cris_got_elt_size |
+ |
+#define bfd_elf32_bfd_debug_info_start bfd_void |
+#define bfd_elf32_bfd_debug_info_end bfd_void |
+#define bfd_elf32_bfd_debug_info_accumulate \ |
+ ((void (*) (bfd*, struct bfd_section *)) bfd_void) |
+/* Later, we my want to optimize RELA entries into REL entries for dynamic |
+ linking and libraries (if it's a win of any significance). Until then, |
+ take the easy route. */ |
+// #define elf_backend_may_use_rel_p 0 |
+// #define elf_backend_may_use_rela_p 1 |
+// #define elf_backend_rela_normal 1 |
+ |
+#define bfd_elf32_bfd_get_relocated_section_contents \ |
+ bfd_generic_get_relocated_section_contents |
+ |
+#define bfd_elf32_bfd_relax_section bfd_generic_relax_section |
+ |
+#define elf_backend_can_gc_sections 0 |
+#define elf_backend_can_refcount 0 |
+#define elf_backend_want_got_sym 1 |
+#define elf_backend_gc_keep _bfd_elf_gc_keep |
+#define elf_backend_gc_mark_dynamic_ref bfd_elf_gc_mark_dynamic_ref_symbol |
+#define elf_backend_gc_mark_hook _bfd_elf_gc_mark_hook |
+#define elf_backend_gc_mark_extra_sections _bfd_elf_gc_mark_extra_sections |
+#define elf_backend_gc_sweep_hook NULL |
+#define bfd_elf32_bfd_gc_sections bfd_elf_gc_sections |
+ |
+#ifndef bfd_elf32_bfd_merge_sections |
+#define bfd_elf32_bfd_merge_sections \ |
+ _bfd_elf_merge_sections |
+#endif |
+ |
+#ifndef bfd_elf32_bfd_is_group_section |
+#define bfd_elf32_bfd_is_group_section bfd_elf_is_group_section |
+#endif |
+ |
+#ifndef bfd_elf32_bfd_discard_group |
+#define bfd_elf32_bfd_discard_group bfd_generic_discard_group |
+#endif |
+ |
+#ifndef bfd_elf32_section_already_linked |
+#define bfd_elf32_section_already_linked \ |
+ _bfd_elf_section_already_linked |
+#endif |
+ |
+#ifndef bfd_elf32_bfd_define_common_symbol |
+#define bfd_elf32_bfd_define_common_symbol bfd_generic_define_common_symbol |
+#endif |
+ |
+#ifndef bfd_elf32_bfd_lookup_section_flags |
+#define bfd_elf32_bfd_lookup_section_flags bfd_elf_lookup_section_flags |
+#endif |
+ |
+#ifndef bfd_elf32_bfd_make_debug_symbol |
+#define bfd_elf32_bfd_make_debug_symbol \ |
+ ((asymbol * (*) (bfd *, void *, unsigned long)) bfd_nullvoidptr) |
+#endif |
+ |
+#ifndef bfd_elf32_bfd_copy_private_symbol_data |
+#define bfd_elf32_bfd_copy_private_symbol_data \ |
+ _bfd_elf_copy_private_symbol_data |
+#endif |
+ |
+#ifndef bfd_elf32_bfd_copy_private_section_data |
+#define bfd_elf32_bfd_copy_private_section_data \ |
+ _bfd_elf_copy_private_section_data |
+#endif |
+#ifndef bfd_elf32_bfd_copy_private_header_data |
+#define bfd_elf32_bfd_copy_private_header_data \ |
+ _bfd_elf_copy_private_header_data |
+#endif |
+#ifndef bfd_elf32_bfd_copy_private_bfd_data |
+#define bfd_elf32_bfd_copy_private_bfd_data \ |
+ _bfd_elf_copy_private_bfd_data |
+#endif |
+#ifndef bfd_elf32_bfd_print_private_bfd_data |
+#define bfd_elf32_bfd_print_private_bfd_data \ |
+ _bfd_elf_print_private_bfd_data |
+#endif |
+#ifndef bfd_elf32_bfd_merge_private_bfd_data |
+#define bfd_elf32_bfd_merge_private_bfd_data \ |
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true) |
+#endif |
+#ifndef bfd_elf32_bfd_set_private_flags |
+#define bfd_elf32_bfd_set_private_flags \ |
+ ((bfd_boolean (*) (bfd *, flagword)) bfd_true) |
+#endif |
+#ifndef bfd_elf32_bfd_is_local_label_name |
+#define bfd_elf32_bfd_is_local_label_name _bfd_elf_is_local_label_name |
+#endif |
+#ifndef bfd_elf32_bfd_is_target_special_symbol |
+#define bfd_elf32_bfd_is_target_special_symbol \ |
+ ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) |
+#endif |
+ |
+#ifndef bfd_elf32_get_dynamic_reloc_upper_bound |
+#define bfd_elf32_get_dynamic_reloc_upper_bound \ |
+ _bfd_elf_get_dynamic_reloc_upper_bound |
+#endif |
+#ifndef bfd_elf32_canonicalize_dynamic_reloc |
+#define bfd_elf32_canonicalize_dynamic_reloc \ |
+ _bfd_elf_canonicalize_dynamic_reloc |
+#endif |
+ |
+#define bfd_elf32_bfd_link_hash_table_create _bfd_elf_link_hash_table_create |
+#define bfd_elf32_bfd_link_add_symbols bfd_elf_link_add_symbols |
+#define bfd_elf32_bfd_final_link bfd_elf_final_link |
+ |
+#define bfd_elf32_bfd_link_just_syms _bfd_elf_link_just_syms |
+ |
+#define bfd_elf32_bfd_copy_link_hash_symbol_type \ |
+ _bfd_elf_copy_link_hash_symbol_type |
+ |
+#define bfd_elf32_bfd_link_split_section _bfd_generic_link_split_section |
+#define bfd_elf32_archive_p bfd_generic_archive_p |
+#define bfd_elf32_write_archive_contents _bfd_write_archive_contents |
+#define bfd_elf32_mkobject bfd_elf_make_object |
+#define bfd_elf32_mkcorefile bfd_elf_mkcorefile |
+#define bfd_elf32_mkarchive _bfd_generic_mkarchive |
+#define bfd_elf32_print_symbol bfd_elf_print_symbol |
+#define elf_symbol_leading_char 0 |
+ |
+#define elf_backend_arch_data NULL |
+ |
+#ifndef ELF_TARGET_ID |
+#define ELF_TARGET_ID GENERIC_ELF_DATA |
+#endif |
+ |
+#ifndef ELF_OSABI |
+#define ELF_OSABI ELFOSABI_NONE |
+#endif |
+ |
+#define ELF_COMMONPAGESIZE ELF_MAXPAGESIZE |
+#define ELF_MINPAGESIZE ELF_COMMONPAGESIZE |
+ |
+#if ELF_COMMONPAGESIZE > ELF_MAXPAGESIZE |
+# error ELF_COMMONPAGESIZE > ELF_MAXPAGESIZE |
+#endif |
+#if ELF_MINPAGESIZE > ELF_COMMONPAGESIZE |
+# error ELF_MINPAGESIZE > ELF_COMMONPAGESIZE |
+#endif |
+ |
+#ifndef ELF_DYNAMIC_SEC_FLAGS |
+/* Note that we set the SEC_IN_MEMORY flag for these sections. */ |
+#define ELF_DYNAMIC_SEC_FLAGS \ |
+ (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS \ |
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED) |
+#endif |
+ |
+#define elf_backend_collect FALSE |
+#define elf_backend_type_change_ok FALSE |
+ |
+#define elf_backend_sym_is_global 0 |
+#define elf_backend_object_p 0 |
+#define elf_backend_symbol_processing 0 |
+#define elf_backend_symbol_table_processing 0 |
+#define elf_backend_get_symbol_type 0 |
+#define elf_backend_archive_symbol_lookup _bfd_elf_archive_symbol_lookup |
+#define elf_backend_name_local_section_symbols 0 |
+#define elf_backend_section_processing 0 |
+#define elf_backend_section_from_shdr _bfd_elf_make_section_from_shdr |
+#define elf_backend_section_flags 0 |
+#define elf_backend_get_sec_type_attr _bfd_elf_get_sec_type_attr |
+#define elf_backend_section_from_phdr _bfd_elf_make_section_from_phdr |
+#define elf_backend_fake_sections 0 |
+#define elf_backend_section_from_bfd_section 0 |
+#define elf_backend_add_symbol_hook 0 |
+#define elf_backend_link_output_symbol_hook 0 |
+#define elf_backend_create_dynamic_sections 0 |
+#define elf_backend_omit_section_dynsym _bfd_elf_link_omit_section_dynsym |
+#define elf_backend_relocs_compatible _bfd_elf_default_relocs_compatible |
+#define elf_backend_check_relocs 0 |
+#define elf_backend_check_directives 0 |
+#define elf_backend_notice_as_needed _bfd_elf_notice_as_needed |
+#define elf_backend_adjust_dynamic_symbol 0 |
+#define elf_backend_always_size_sections 0 |
+#define elf_backend_size_dynamic_sections 0 |
+#define elf_backend_init_index_section \ |
+ ((void (*) (bfd *, struct bfd_link_info *)) bfd_void) |
+#define elf_backend_finish_dynamic_symbol 0 |
+#define elf_backend_finish_dynamic_sections 0 |
+#define elf_backend_begin_write_processing 0 |
+#define elf_backend_final_write_processing 0 |
+#define elf_backend_additional_program_headers 0 |
+#define elf_backend_modify_segment_map 0 |
+#ifndef elf_backend_modify_program_headers |
+#define elf_backend_modify_program_headers 0 |
+#endif |
+#ifndef elf_backend_ecoff_debug_swap |
+#define elf_backend_ecoff_debug_swap 0 |
+#endif |
+#ifndef elf_backend_bfd_from_remote_memory |
+#define elf_backend_bfd_from_remote_memory _bfd_elf32_bfd_from_remote_memory |
+#endif |
+#ifndef elf_backend_got_header_size |
+#define elf_backend_got_header_size 0 |
+#endif |
+#ifndef elf_backend_got_elt_size |
+#define elf_backend_got_elt_size _bfd_elf_default_got_elt_size |
+#endif |
+#ifndef elf_backend_obj_attrs_vendor |
+#define elf_backend_obj_attrs_vendor NULL |
+#endif |
+#ifndef elf_backend_obj_attrs_section |
+#define elf_backend_obj_attrs_section NULL |
+#endif |
+#ifndef elf_backend_obj_attrs_arg_type |
+#define elf_backend_obj_attrs_arg_type NULL |
+#endif |
+#ifndef elf_backend_obj_attrs_section_type |
+#define elf_backend_obj_attrs_section_type SHT_GNU_ATTRIBUTES |
+#endif |
+#ifndef elf_backend_obj_attrs_order |
+#define elf_backend_obj_attrs_order NULL |
+#endif |
+#define elf_backend_obj_attrs_handle_unknown NULL |
+#define elf_backend_static_tls_alignment 1 |
+#define elf_backend_post_process_headers _bfd_elf_post_process_headers |
+#define elf_backend_print_symbol_all NULL |
+#define elf_backend_output_arch_local_syms NULL |
+#define elf_backend_output_arch_syms NULL |
+#define elf_backend_copy_indirect_symbol _bfd_elf_link_hash_copy_indirect |
+#define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol |
+#define elf_backend_fixup_symbol NULL |
+#define elf_backend_merge_symbol_attribute NULL |
+#define elf_backend_get_target_dtag NULL |
+#define elf_backend_ignore_undef_symbol NULL |
+#define elf_backend_emit_relocs _bfd_elf_link_output_relocs |
+#define elf_backend_count_relocs NULL |
+#define elf_backend_grok_prstatus NULL |
+#define elf_backend_grok_psinfo NULL |
+#define elf_backend_write_core_note NULL |
+#define elf_backend_lookup_section_flags_hook NULL |
+#define elf_backend_reloc_type_class _bfd_elf_reloc_type_class |
+#define elf_backend_discard_info NULL |
+#define elf_backend_ignore_discarded_relocs NULL |
+#define elf_backend_action_discarded _bfd_elf_default_action_discarded |
+#define elf_backend_eh_frame_address_size _bfd_elf_eh_frame_address_size |
+#define elf_backend_can_make_relative_eh_frame _bfd_elf_can_make_relative |
+#define elf_backend_can_make_lsda_relative_eh_frame _bfd_elf_can_make_relative |
+#define elf_backend_encode_eh_address _bfd_elf_encode_eh_address |
+#define elf_backend_write_section NULL |
+#define elf_backend_mips_irix_compat NULL |
+#define elf_backend_mips_rtype_to_howto NULL |
+ |
+/* Previously, backends could only use SHT_REL or SHT_RELA relocation |
+ sections, but not both. They defined USE_REL to indicate SHT_REL |
+ sections, and left it undefined to indicated SHT_RELA sections. |
+ For backwards compatibility, we still support this usage. */ |
+#ifndef USE_REL |
+#define USE_REL 0 |
+#endif |
+ |
+/* Use these in new code. */ |
+#define elf_backend_may_use_rel_p USE_REL |
+#define elf_backend_may_use_rela_p !USE_REL |
+#define elf_backend_default_use_rela_p !USE_REL |
+#define elf_backend_rela_plts_and_copies_p elf_backend_default_use_rela_p |
+ |
+#ifndef elf_backend_rela_normal |
+#define elf_backend_rela_normal 0 |
+#endif |
+ |
+#define elf_backend_plt_sym_val NULL |
+#define elf_backend_relplt_name NULL |
+ |
+#define ELF_MACHINE_ALT1 0 |
+#define ELF_MACHINE_ALT2 0 |
+ |
+#ifndef elf_backend_size_info |
+#define elf_backend_size_info _bfd_elf32_size_info |
+#endif |
+ |
+#define elf_backend_special_sections NULL |
+#define elf_backend_sign_extend_vma 0 |
+#define elf_backend_link_order_error_handler _bfd_default_error_handler |
+#define elf_backend_common_definition _bfd_elf_common_definition |
+#define elf_backend_common_section_index _bfd_elf_common_section_index |
+#define elf_backend_common_section _bfd_elf_common_section |
+ |
+#define elf_backend_merge_symbol NULL |
+#define elf_backend_hash_symbol _bfd_elf_hash_symbol |
+#define elf_backend_is_function_type _bfd_elf_is_function_type |
+#define elf_backend_maybe_function_sym _bfd_elf_maybe_function_sym |
+ |
+#define elf_match_priority \ |
+ (ELF_ARCH == bfd_arch_unknown ? 2 : ELF_OSABI == ELFOSABI_NONE ? 1 : 0) |
+ |
+extern const struct elf_size_info _bfd_elf32_size_info; |
+ |
+static struct elf_backend_data elf32_bed = |
+{ |
+ ELF_ARCH, /* arch */ |
+ ELF_TARGET_ID, /* target_id */ |
+ ELF_MACHINE_CODE, /* elf_machine_code */ |
+ ELF_OSABI, /* elf_osabi */ |
+ ELF_MAXPAGESIZE, /* maxpagesize */ |
+ ELF_MINPAGESIZE, /* minpagesize */ |
+ ELF_COMMONPAGESIZE, /* commonpagesize */ |
+ ELF_DYNAMIC_SEC_FLAGS, /* dynamic_sec_flags */ |
+ elf_backend_arch_data, |
+ elf_info_to_howto, |
+ elf_info_to_howto_rel, |
+ elf_backend_sym_is_global, |
+ elf_backend_object_p, |
+ elf_backend_symbol_processing, |
+ elf_backend_symbol_table_processing, |
+ elf_backend_get_symbol_type, |
+ elf_backend_archive_symbol_lookup, |
+ elf_backend_name_local_section_symbols, |
+ elf_backend_section_processing, |
+ elf_backend_section_from_shdr, |
+ elf_backend_section_flags, |
+ elf_backend_get_sec_type_attr, |
+ elf_backend_section_from_phdr, |
+ elf_backend_fake_sections, |
+ elf_backend_section_from_bfd_section, |
+ elf_backend_add_symbol_hook, |
+ elf_backend_link_output_symbol_hook, |
+ elf_backend_create_dynamic_sections, |
+ elf_backend_omit_section_dynsym, |
+ elf_backend_relocs_compatible, |
+ elf_backend_check_relocs, |
+ elf_backend_check_directives, |
+ elf_backend_notice_as_needed, |
+ elf_backend_adjust_dynamic_symbol, |
+ elf_backend_always_size_sections, |
+ elf_backend_size_dynamic_sections, |
+ elf_backend_init_index_section, |
+ elf_backend_relocate_section, |
+ elf_backend_finish_dynamic_symbol, |
+ elf_backend_finish_dynamic_sections, |
+ elf_backend_begin_write_processing, |
+ elf_backend_final_write_processing, |
+ elf_backend_additional_program_headers, |
+ elf_backend_modify_segment_map, |
+ elf_backend_modify_program_headers, |
+ elf_backend_gc_keep, |
+ elf_backend_gc_mark_dynamic_ref, |
+ elf_backend_gc_mark_hook, |
+ elf_backend_gc_mark_extra_sections, |
+ elf_backend_gc_sweep_hook, |
+ elf_backend_post_process_headers, |
+ elf_backend_print_symbol_all, |
+ elf_backend_output_arch_local_syms, |
+ elf_backend_output_arch_syms, |
+ elf_backend_copy_indirect_symbol, |
+ elf_backend_hide_symbol, |
+ elf_backend_fixup_symbol, |
+ elf_backend_merge_symbol_attribute, |
+ elf_backend_get_target_dtag, |
+ elf_backend_ignore_undef_symbol, |
+ elf_backend_emit_relocs, |
+ elf_backend_count_relocs, |
+ elf_backend_grok_prstatus, |
+ elf_backend_grok_psinfo, |
+ elf_backend_write_core_note, |
+ elf_backend_lookup_section_flags_hook, |
+ elf_backend_reloc_type_class, |
+ elf_backend_discard_info, |
+ elf_backend_ignore_discarded_relocs, |
+ elf_backend_action_discarded, |
+ elf_backend_eh_frame_address_size, |
+ elf_backend_can_make_relative_eh_frame, |
+ elf_backend_can_make_lsda_relative_eh_frame, |
+ elf_backend_encode_eh_address, |
+ elf_backend_write_section, |
+ elf_backend_mips_irix_compat, |
+ elf_backend_mips_rtype_to_howto, |
+ elf_backend_ecoff_debug_swap, |
+ elf_backend_bfd_from_remote_memory, |
+ elf_backend_plt_sym_val, |
+ elf_backend_common_definition, |
+ elf_backend_common_section_index, |
+ elf_backend_common_section, |
+ elf_backend_merge_symbol, |
+ elf_backend_hash_symbol, |
+ elf_backend_is_function_type, |
+ elf_backend_maybe_function_sym, |
+ elf_backend_link_order_error_handler, |
+ elf_backend_relplt_name, |
+ ELF_MACHINE_ALT1, |
+ ELF_MACHINE_ALT2, |
+ &elf_backend_size_info, |
+ elf_backend_special_sections, |
+ elf_backend_got_header_size, |
+ elf_backend_got_elt_size, |
+ elf_backend_obj_attrs_vendor, |
+ elf_backend_obj_attrs_section, |
+ elf_backend_obj_attrs_arg_type, |
+ elf_backend_obj_attrs_section_type, |
+ elf_backend_obj_attrs_order, |
+ elf_backend_obj_attrs_handle_unknown, |
+ elf_backend_static_tls_alignment, |
+ elf_backend_stack_align, |
+ elf_backend_collect, |
+ elf_backend_type_change_ok, |
+ elf_backend_may_use_rel_p, |
+ elf_backend_may_use_rela_p, |
+ elf_backend_default_use_rela_p, |
+ elf_backend_rela_plts_and_copies_p, |
+ elf_backend_rela_normal, |
+ elf_backend_sign_extend_vma, |
+ elf_backend_want_got_plt, |
+ elf_backend_plt_readonly, |
+ elf_backend_want_plt_sym, |
+ elf_backend_plt_not_loaded, |
+ elf_backend_plt_alignment, |
+ elf_backend_can_gc_sections, |
+ elf_backend_can_refcount, |
+ elf_backend_want_got_sym, |
+ elf_backend_want_dynbss, |
+ elf_backend_want_p_paddr_set_to_zero, |
+ elf_backend_default_execstack, |
+ elf_backend_caches_rawsize |
+}; |
+ |
+/* Forward declaration for use when initialising alternative_target field. */ |
+#ifdef TARGET_LITTLE_SYM |
+extern const bfd_target TARGET_LITTLE_SYM; |
+#endif |
+ |
+#ifdef TARGET_BIG_SYM |
+const bfd_target TARGET_BIG_SYM = |
+{ |
+ /* name: identify kind of target */ |
+ TARGET_BIG_NAME, |
+ |
+ /* flavour: general indication about file */ |
+ bfd_target_elf_flavour, |
+ |
+ /* byteorder: data is big endian */ |
+ BFD_ENDIAN_BIG, |
+ |
+ /* header_byteorder: header is also big endian */ |
+ BFD_ENDIAN_BIG, |
+ |
+ /* object_flags: mask of all file flags */ |
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
+ | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS), |
+ |
+ /* section_flags: mask of all section flags */ |
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
+ | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES |
+ | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP), |
+ |
+ /* leading_symbol_char: is the first char of a user symbol |
+ predictable, and if so what is it */ |
+ elf_symbol_leading_char, |
+ |
+ /* ar_pad_char: pad character for filenames within an archive header |
+ FIXME: this really has nothing to do with ELF, this is a characteristic |
+ of the archiver and/or os and should be independently tunable */ |
+ '/', |
+ |
+ /* ar_max_namelen: maximum number of characters in an archive header |
+ FIXME: this really has nothing to do with ELF, this is a characteristic |
+ of the archiver and should be independently tunable. The System V ABI, |
+ Chapter 7 (Formats & Protocols), Archive section sets this as 15. */ |
+ 15, |
+ |
+ elf_match_priority, |
+ |
+ /* Routines to byte-swap various sized integers from the data sections */ |
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64, |
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32, |
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, |
+ |
+ /* Routines to byte-swap various sized integers from the file headers */ |
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64, |
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32, |
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, |
+ |
+ /* bfd_check_format: check the format of a file being read */ |
+ { _bfd_dummy_target, /* unknown format */ |
+ bfd_elf32_object_p, /* assembler/linker output (object file) */ |
+ bfd_elf32_archive_p, /* an archive */ |
+ bfd_elf32_core_file_p /* a core file */ |
+ }, |
+ |
+ /* bfd_set_format: set the format of a file being written */ |
+ { bfd_false, |
+ bfd_elf32_mkobject, |
+ bfd_elf32_mkarchive, |
+ bfd_elf32_mkcorefile |
+ }, |
+ |
+ /* bfd_write_contents: write cached information into a file being written */ |
+ { bfd_false, |
+ bfd_elf32_write_object_contents, |
+ bfd_elf32_write_archive_contents, |
+ bfd_elf32_write_corefile_contents, |
+ }, |
+ |
+ BFD_JUMP_TABLE_GENERIC (bfd_elf32), |
+ BFD_JUMP_TABLE_COPY (bfd_elf32), |
+ BFD_JUMP_TABLE_CORE (bfd_elf32), |
+#ifdef bfd_elf32_archive_functions |
+ BFD_JUMP_TABLE_ARCHIVE (bfd_elf32_archive), |
+#else |
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), |
+#endif |
+ BFD_JUMP_TABLE_SYMBOLS (bfd_elf32), |
+ BFD_JUMP_TABLE_RELOCS (bfd_elf32), |
+ BFD_JUMP_TABLE_WRITE (bfd_elf32), |
+ BFD_JUMP_TABLE_LINK (bfd_elf32), |
+ BFD_JUMP_TABLE_DYNAMIC (bfd_elf32), |
+ |
+ /* Alternative endian target. */ |
+#ifdef TARGET_LITTLE_SYM |
+ & TARGET_LITTLE_SYM, |
+#else |
+ NULL, |
+#endif |
+ |
+ /* backend_data: */ |
+ &elf32_bed |
+}; |
+#endif |
+ |
+#ifdef TARGET_LITTLE_SYM |
+const bfd_target TARGET_LITTLE_SYM = |
+{ |
+ /* name: identify kind of target */ |
+ TARGET_LITTLE_NAME, |
+ |
+ /* flavour: general indication about file */ |
+ bfd_target_elf_flavour, |
+ |
+ /* byteorder: data is little endian */ |
+ BFD_ENDIAN_LITTLE, |
+ |
+ /* header_byteorder: header is also little endian */ |
+ BFD_ENDIAN_LITTLE, |
+ |
+ /* object_flags: mask of all file flags */ |
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
+ | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS), |
+ |
+ /* section_flags: mask of all section flags */ |
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
+ | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES |
+ | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP), |
+ |
+ /* leading_symbol_char: is the first char of a user symbol |
+ predictable, and if so what is it */ |
+ elf_symbol_leading_char, |
+ |
+ /* ar_pad_char: pad character for filenames within an archive header |
+ FIXME: this really has nothing to do with ELF, this is a characteristic |
+ of the archiver and/or os and should be independently tunable */ |
+ '/', |
+ |
+ /* ar_max_namelen: maximum number of characters in an archive header |
+ FIXME: this really has nothing to do with ELF, this is a characteristic |
+ of the archiver and should be independently tunable. The System V ABI, |
+ Chapter 7 (Formats & Protocols), Archive section sets this as 15. */ |
+ 15, |
+ |
+ elf_match_priority, |
+ |
+ /* Routines to byte-swap various sized integers from the data sections */ |
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64, |
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32, |
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, |
+ |
+ /* Routines to byte-swap various sized integers from the file headers */ |
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64, |
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32, |
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, |
+ |
+ /* bfd_check_format: check the format of a file being read */ |
+ { _bfd_dummy_target, /* unknown format */ |
+ bfd_elf32_object_p, /* assembler/linker output (object file) */ |
+ bfd_elf32_archive_p, /* an archive */ |
+ bfd_elf32_core_file_p /* a core file */ |
+ }, |
+ |
+ /* bfd_set_format: set the format of a file being written */ |
+ { bfd_false, |
+ bfd_elf32_mkobject, |
+ bfd_elf32_mkarchive, |
+ bfd_elf32_mkcorefile |
+ }, |
+ |
+ /* bfd_write_contents: write cached information into a file being written */ |
+ { bfd_false, |
+ bfd_elf32_write_object_contents, |
+ bfd_elf32_write_archive_contents, |
+ bfd_elf32_write_corefile_contents, |
+ }, |
+ |
+ BFD_JUMP_TABLE_GENERIC (bfd_elf32), |
+ BFD_JUMP_TABLE_COPY (bfd_elf32), |
+ BFD_JUMP_TABLE_CORE (bfd_elf32), |
+#ifdef bfd_elf32_archive_functions |
+ BFD_JUMP_TABLE_ARCHIVE (bfd_elf32_archive), |
+#else |
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), |
+#endif |
+ BFD_JUMP_TABLE_SYMBOLS (bfd_elf32), |
+ BFD_JUMP_TABLE_RELOCS (bfd_elf32), |
+ BFD_JUMP_TABLE_WRITE (bfd_elf32), |
+ BFD_JUMP_TABLE_LINK (bfd_elf32), |
+ BFD_JUMP_TABLE_DYNAMIC (bfd_elf32), |
+ |
+ /* Alternative endian target. */ |
+#ifdef TARGET_BIG_SYM |
+ & TARGET_BIG_SYM, |
+#else |
+ NULL, |
+#endif |
+ |
+ /* backend_data: */ |
+ &elf32_bed |
+}; |
+#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 |
@@ -9945,6 +9945,10 @@ |
sym->st_value + addend); |
} |
|
+/* |
+ * Must return the section offset in bytes, that is, in the target's |
+ * address space, rather than in the hosts 'octets'. |
+ */ |
bfd_vma |
_bfd_elf_section_offset (bfd *abfd, |
struct bfd_link_info *info, |
@@ -9962,8 +9966,8 @@ |
if ((sec->flags & SEC_ELF_REVERSE_COPY) != 0) |
{ |
const struct elf_backend_data *bed = get_elf_backend_data (abfd); |
- bfd_size_type address_size = bed->s->arch_size / 8; |
- offset = sec->size - offset - address_size; |
+ bfd_size_type address_size = bed->s->arch_size / 8; // Octets |
+ offset = (sec->size -address_size)/bfd_octets_per_byte(abfd) - offset; |
} |
return offset; |
} |
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-02-21 19:46:05.351518604 -0500 |
@@ -1348,7 +1348,7 @@ |
return FALSE; |
|
if (sym->st_size > h->size) |
- h->size = sym->st_size; |
+ h->size = sym->st_size; // Symbol sizes are in bytes, not octets |
|
*size_change_ok = TRUE; |
} |
@@ -3008,7 +3008,7 @@ |
s = bfd_get_linker_section (hash_table->dynobj, ".dynamic"); |
BFD_ASSERT (s != NULL); |
|
- newsize = s->size + bed->s->sizeof_dyn; |
+ newsize = s->size + bed->s->sizeof_dyn; // Octets |
newcontents = (bfd_byte *) bfd_realloc (s->contents, newsize); |
if (newcontents == NULL) |
return FALSE; |
@@ -3017,7 +3017,7 @@ |
dyn.d_un.d_val = val; |
bed->s->swap_dyn_out (hash_table->dynobj, &dyn, newcontents + s->size); |
|
- s->size = newsize; |
+ s->size = newsize; // Octets |
s->contents = newcontents; |
|
return TRUE; |
@@ -3417,7 +3417,7 @@ |
continue; |
} |
|
- sz = s->size; |
+ sz = s->size; // Octets |
msg = (char *) bfd_alloc (abfd, sz + 1); |
if (msg == NULL) |
goto error_return; |
@@ -3436,7 +3436,7 @@ |
{ |
/* Clobber the section size so that the warning does |
not get copied into the output file. */ |
- s->size = 0; |
+ s->size = 0; // Octets |
|
/* Also set SEC_EXCLUDE, so that symbols defined in |
the warning section don't get copied to the output. */ |
@@ -3829,7 +3829,7 @@ |
|
flags = BSF_NO_FLAGS; |
sec = NULL; |
- value = isym->st_value; |
+ value = isym->st_value; // Bytes |
common = bed->common_definition (isym); |
|
bind = ELF_ST_BIND (isym->st_info); |
@@ -3869,7 +3869,7 @@ |
sec = bfd_com_section_ptr; |
/* What ELF calls the size we call the value. What ELF |
calls the value we call the alignment. */ |
- value = isym->st_size; |
+ value = isym->st_size; // Bytes, not octets |
} |
else |
{ |
@@ -3884,7 +3884,7 @@ |
isym->st_shndx = SHN_UNDEF; |
} |
else if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0) |
- value -= sec->vma; |
+ value -= sec->vma; // Bytes |
} |
|
name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, |
@@ -5946,17 +5946,17 @@ |
const char *name; |
|
cdefs = 0; |
- size = 0; |
+ size = 0; // Octets |
|
/* Make space for the base version. */ |
- size += sizeof (Elf_External_Verdef); |
- size += sizeof (Elf_External_Verdaux); |
+ size += sizeof (Elf_External_Verdef); // Octets |
+ size += sizeof (Elf_External_Verdaux); // Octets |
++cdefs; |
|
/* Make space for the default version. */ |
if (info->create_default_symver) |
{ |
- size += sizeof (Elf_External_Verdef); |
+ size += sizeof (Elf_External_Verdef); // Octets |
++cdefs; |
} |
|
@@ -5976,7 +5976,7 @@ |
size += sizeof (Elf_External_Verdaux); |
} |
|
- s->size = size; |
+ s->size = size; // Octets |
s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size); |
if (s->contents == NULL && s->size != 0) |
return FALSE; |
@@ -6210,7 +6210,7 @@ |
bfd_byte *p; |
|
/* Build the version dependency section. */ |
- size = 0; |
+ size = 0; // Octets |
crefs = 0; |
for (t = elf_tdata (output_bfd)->verref; |
t != NULL; |
@@ -6218,13 +6218,13 @@ |
{ |
Elf_Internal_Vernaux *a; |
|
- size += sizeof (Elf_External_Verneed); |
+ size += sizeof (Elf_External_Verneed); // Octets |
++crefs; |
for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr) |
size += sizeof (Elf_External_Vernaux); |
} |
|
- s->size = size; |
+ s->size = size; // Octets, not bytes |
s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size); |
if (s->contents == NULL) |
return FALSE; |
@@ -6460,7 +6460,7 @@ |
s = bfd_get_linker_section (dynobj, ".hash"); |
BFD_ASSERT (s != NULL); |
hash_entry_size = elf_section_data (s)->this_hdr.sh_entsize; |
- s->size = ((2 + bucketcount + dynsymcount) * hash_entry_size); |
+ s->size = ((2 + bucketcount + dynsymcount) * hash_entry_size);//octets |
s->contents = (unsigned char *) bfd_zalloc (output_bfd, s->size); |
if (s->contents == NULL) |
return FALSE; |
@@ -6519,7 +6519,7 @@ |
/* Empty .gnu.hash section is special. */ |
BFD_ASSERT (cinfo.min_dynindx == -1); |
free (cinfo.hashcodes); |
- s->size = 5 * 4 + bed->s->arch_size / 8; |
+ s->size = 5 * 4 + bed->s->arch_size / 8; // In octets |
contents = (unsigned char *) bfd_zalloc (output_bfd, s->size); |
if (contents == NULL) |
return FALSE; |
@@ -7478,7 +7478,7 @@ |
Elf_Internal_Sym *isymbuf, |
size_t locsymcount, |
size_t symidx, |
- bfd_vma val) |
+ bfd_vma val) // in bytes |
{ |
struct elf_link_hash_entry **sym_hashes; |
struct elf_link_hash_entry *h; |
@@ -7549,7 +7549,7 @@ |
asection *sec = flinfo->sections [i]; |
|
*result = _bfd_elf_rel_local_sym (input_bfd, sym, &sec, 0); |
- *result += sec->output_offset + sec->output_section->vma; |
+ *result += sec->output_offset + sec->output_section->vma; // bytes |
#ifdef DEBUG |
printf ("Found symbol with value %8.8lx\n", |
(unsigned long) *result); |
@@ -7591,7 +7591,7 @@ |
for (curr = sections; curr; curr = curr->next) |
if (strcmp (curr->name, name) == 0) |
{ |
- *result = curr->vma; |
+ *result = curr->vma; // Value returned is in bytes |
return TRUE; |
} |
|
@@ -7606,6 +7606,10 @@ |
{ |
if (strncmp (".end", name + len, 4) == 0) |
{ |
+ // TODO: Octets per byte -- needs to adjust the calling |
+ // convention, though, so that the BFD in question is available |
+ // or otherwise so that we know the number of octets per byte. |
+ // *result = curr->vma + curr->size / bfd_octets_per_byte(abfd); |
*result = curr->vma + curr->size; |
return TRUE; |
} |
@@ -7919,8 +7923,8 @@ |
else |
shift = (8 * wordsz) - (start + len); |
|
- /* FIXME: octets_per_byte. */ |
- x = get_value (wordsz, chunksz, input_bfd, contents + rel->r_offset); |
+ x = get_value (wordsz, chunksz, input_bfd, |
+ contents + rel->r_offset * bfd_octets_per_byte(input_bfd)); |
|
#ifdef DEBUG |
printf ("Doing complex reloc: " |
@@ -7953,7 +7957,8 @@ |
(unsigned long) ((relocation & mask) << shift), (unsigned long) x); |
#endif |
/* FIXME: octets_per_byte. */ |
- put_value (wordsz, chunksz, input_bfd, x, contents + rel->r_offset); |
+ put_value (wordsz, chunksz, input_bfd, x, |
+ contents + rel->r_offset * bfd_octets_per_byte(input_bfd)); |
return r; |
} |
|
@@ -8248,7 +8253,7 @@ |
size = 0; |
for (lo = dynamic_relocs->map_head.link_order; lo != NULL; lo = lo->next) |
if (lo->type == bfd_indirect_link_order) |
- size += lo->u.indirect.section->size; |
+ size += lo->u.indirect.section->size; // in octets |
|
if (size != dynamic_relocs->size) |
return 0; |
@@ -8290,6 +8295,7 @@ |
erel = o->contents; |
erelend = o->contents + o->size; |
/* FIXME: octets_per_byte. */ |
+fprintf(stderr, "INVALID-OCTETS-PER-BYTE-CODE - C\n"); |
p = sort + o->output_offset / ext_size * sort_elt; |
|
while (erel < erelend) |
@@ -8335,6 +8341,7 @@ |
erel = o->contents; |
erelend = o->contents + o->size; |
/* FIXME: octets_per_byte. */ |
+fprintf(stderr, "INVALID-OCTETS-PER-BYTE-CODE - D\n"); |
p = sort + o->output_offset / ext_size * sort_elt; |
while (erel < erelend) |
{ |
@@ -8439,7 +8446,7 @@ |
destshndx += bfd_get_symcount (flinfo->output_bfd); |
} |
|
- bed->s->swap_symbol_out (flinfo->output_bfd, elfsym, dest, destshndx); |
+ bed->s->swap_symbol_out (flinfo->output_bfd, elfsym, dest, destshndx); // |
flinfo->symbuf_count += 1; |
bfd_get_symcount (flinfo->output_bfd) += 1; |
|
@@ -9215,7 +9222,7 @@ |
asection *o; |
const struct elf_backend_data *bed; |
struct elf_link_hash_entry **sym_hashes; |
- bfd_size_type address_size; |
+ bfd_size_type address_size_in_octets; |
bfd_vma r_type_mask; |
int r_sym_shift; |
bfd_boolean have_file_sym = FALSE; |
@@ -9246,7 +9253,7 @@ |
isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents; |
if (isymbuf == NULL && locsymcount != 0) |
{ |
- isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr, locsymcount, 0, |
+ isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr, locsymcount, 0,// |
flinfo->internal_syms, |
flinfo->external_syms, |
flinfo->locsym_shndx); |
@@ -9392,15 +9399,15 @@ |
we assume that they also have a reasonable value for |
output_section. Any special sections must be set up to meet |
these requirements. */ |
- osym.st_value += isec->output_offset; |
+ osym.st_value += isec->output_offset; // Bytes |
if (!flinfo->info->relocatable) |
{ |
- osym.st_value += isec->output_section->vma; |
+ osym.st_value += isec->output_section->vma; // Bytes |
if (ELF_ST_TYPE (osym.st_info) == STT_TLS) |
{ |
/* STT_TLS symbols are relative to PT_TLS segment base. */ |
BFD_ASSERT (elf_hash_table (flinfo->info)->tls_sec != NULL); |
- osym.st_value -= elf_hash_table (flinfo->info)->tls_sec->vma; |
+ osym.st_value-=elf_hash_table (flinfo->info)->tls_sec->vma;//bytes |
} |
} |
|
@@ -9416,13 +9423,13 @@ |
{ |
r_type_mask = 0xff; |
r_sym_shift = 8; |
- address_size = 4; |
+ address_size_in_octets = 4; |
} |
else |
{ |
r_type_mask = 0xffffffff; |
r_sym_shift = 32; |
- address_size = 8; |
+ address_size_in_octets = 8; |
} |
|
/* Relocate the contents of each section. */ |
@@ -9485,7 +9492,7 @@ |
if (sym.st_shndx == SHN_BAD) |
return FALSE; |
|
- sym.st_value += o->output_offset; |
+ sym.st_value += o->output_offset; // Bytes |
|
indx = bfd_get_symcount (output_bfd); |
ret = elf_link_output_sym (flinfo, name, &sym, o, NULL); |
@@ -9551,7 +9558,7 @@ |
|
/* We need to reverse-copy input .ctors/.dtors sections if |
they are placed in .init_array/.finit_array for output. */ |
- if (o->size > address_size |
+ if (o->size > address_size_in_octets |
&& ((strncmp (o->name, ".ctors", 6) == 0 |
&& strcmp (o->output_section->name, |
".init_array") == 0) |
@@ -9560,7 +9567,7 @@ |
".fini_array") == 0)) |
&& (o->name[6] == 0 || o->name[6] == '.')) |
{ |
- if (o->size != o->reloc_count * address_size) |
+ if (o->size != o->reloc_count * address_size_in_octets) |
{ |
(*_bfd_error_handler) |
(_("error: %B: size of section %A is not " |
@@ -9644,7 +9651,7 @@ |
&& !flinfo->info->relocatable) |
{ |
bfd_vma val; |
- bfd_vma dot = (rel->r_offset |
+ bfd_vma dot = (rel->r_offset // bytes |
+ o->output_offset + o->output_section->vma); |
#ifdef DEBUG |
printf ("Encountered a complex symbol!"); |
@@ -9655,7 +9662,7 @@ |
r_symndx, sym_name); |
printf (" reloc : info %8.8lx, addr %8.8lx\n", |
(unsigned long) rel->r_info, |
- (unsigned long) rel->r_offset); |
+ (unsigned long) rel->r_offset); // bytes |
#endif |
if (!eval_symbol (&val, &sym_name, input_bfd, flinfo, dot, |
isymbuf, locsymcount, s_type == STT_SRELC)) |
@@ -9761,9 +9768,9 @@ |
* bed->s->int_rels_per_ext_rel); |
rel_hash_list = rel_hash; |
rela_hash_list = NULL; |
- last_offset = o->output_offset; |
+ last_offset = o->output_offset; // In bytes |
if (!flinfo->info->relocatable) |
- last_offset += o->output_section->vma; |
+ last_offset += o->output_section->vma; // In bytes |
for (next_erel = 0; irela < irelaend; irela++, next_erel++) |
{ |
unsigned long r_symndx; |
@@ -9793,19 +9800,19 @@ |
offset as the last reloc. elf_eh_frame.c and |
bfd_elf_discard_info rely on reloc offsets |
being ordered. */ |
- irela->r_offset = last_offset; |
+ irela->r_offset = last_offset; // in bytes |
irela->r_info = 0; |
irela->r_addend = 0; |
continue; |
} |
|
- irela->r_offset += o->output_offset; |
+ irela->r_offset += o->output_offset; // Bytes |
|
/* Relocs in an executable have to be virtual addresses. */ |
if (!flinfo->info->relocatable) |
- irela->r_offset += o->output_section->vma; |
+ irela->r_offset += o->output_section->vma; // Bytes |
|
- last_offset = irela->r_offset; |
+ last_offset = irela->r_offset; // Bytes |
|
r_symndx = irela->r_info >> r_sym_shift; |
if (r_symndx == STN_UNDEF) |
@@ -9875,7 +9882,7 @@ |
&& sec->kept_section->output_section != NULL) |
{ |
osec = sec->kept_section->output_section; |
- irela->r_addend -= osec->vma; |
+ irela->r_addend -= osec->vma; // Units are bytes |
} |
|
if (!bfd_is_abs_section (osec)) |
@@ -9883,10 +9890,10 @@ |
r_symndx = osec->target_index; |
if (r_symndx == STN_UNDEF) |
{ |
- irela->r_addend += osec->vma; |
+ irela->r_addend += osec->vma;//Units are bytes |
osec = _bfd_nearby_section (output_bfd, osec, |
osec->vma); |
- irela->r_addend -= osec->vma; |
+ irela->r_addend -= osec->vma; // Bytes |
r_symndx = osec->target_index; |
} |
} |
@@ -9895,7 +9902,7 @@ |
/* Adjust the addend according to where the |
section winds up in the output section. */ |
if (rela_normal) |
- irela->r_addend += sec->output_offset; |
+ irela->r_addend += sec->output_offset; // Both are in bytes |
} |
else |
{ |
@@ -9929,10 +9936,10 @@ |
if (sym.st_shndx == SHN_BAD) |
return FALSE; |
|
- sym.st_value += sec->output_offset; |
+ sym.st_value += sec->output_offset; // Bytes |
if (!flinfo->info->relocatable) |
{ |
- sym.st_value += osec->vma; |
+ sym.st_value += osec->vma; // Bytes |
if (ELF_ST_TYPE (sym.st_info) == STT_TLS) |
{ |
/* STT_TLS symbols are relative to PT_TLS |
@@ -10018,33 +10025,32 @@ |
break; |
default: |
{ |
- /* FIXME: octets_per_byte. */ |
if (! (o->flags & SEC_EXCLUDE)) |
{ |
- file_ptr offset = (file_ptr) o->output_offset; |
- bfd_size_type todo = o->size; |
+ file_ptr offset_octets = (file_ptr) o->output_offset * bfd_octets_per_byte(output_bfd); |
+ bfd_size_type todo_octets = o->size; |
if ((o->flags & SEC_ELF_REVERSE_COPY)) |
{ |
/* Reverse-copy input section to output. */ |
do |
{ |
- todo -= address_size; |
+ todo_octets -= address_size_in_octets; |
if (! bfd_set_section_contents (output_bfd, |
o->output_section, |
- contents + todo, |
- offset, |
- address_size)) |
+ contents + todo_octets, |
+ offset_octets, |
+ address_size_in_octets)) |
return FALSE; |
- if (todo == 0) |
+ if (todo_octets == 0) |
break; |
- offset += address_size; |
+ offset_octets += address_size_in_octets; |
} |
while (1); |
} |
else if (! bfd_set_section_contents (output_bfd, |
o->output_section, |
contents, |
- offset, todo)) |
+ offset_octets, todo_octets)) |
return FALSE; |
} |
} |
@@ -10086,7 +10092,7 @@ |
return FALSE; |
} |
|
- addend = link_order->u.reloc.p->addend; |
+ addend = link_order->u.reloc.p->addend; // bytes, not octets |
|
if (esdo->rel.hdr) |
reldata = &esdo->rel; |
@@ -10128,7 +10134,7 @@ |
/* It seems that we ought to add the symbol value to the |
addend here, but in practice it has already been added |
because it was passed to constructor_callback. */ |
- addend += section->output_section->vma + section->output_offset; |
+ addend += section->output_section->vma +section->output_offset;//bytes |
} |
else if (h != NULL) |
{ |
@@ -10187,7 +10193,9 @@ |
break; |
} |
ok = bfd_set_section_contents (output_bfd, output_section, buf, |
- link_order->offset, size); |
+ link_order->offset |
+ * bfd_octets_per_byte(output_bfd), |
+ size); |
free (buf); |
if (! ok) |
return FALSE; |
@@ -10196,13 +10204,13 @@ |
/* The address of a reloc is relative to the section in a |
relocatable file, and is a virtual address in an executable |
file. */ |
- offset = link_order->offset; |
+ offset = link_order->offset; // Bytes, not octets |
if (! info->relocatable) |
- offset += output_section->vma; |
+ offset += output_section->vma; // Bytes, not octets |
|
for (i = 0; i < bed->s->int_rels_per_ext_rel; i++) |
{ |
- irel[i].r_offset = offset; |
+ irel[i].r_offset = offset; // Bytes, not octets |
irel[i].r_info = 0; |
irel[i].r_addend = 0; |
} |
@@ -10220,7 +10228,7 @@ |
} |
else |
{ |
- irel[0].r_addend = addend; |
+ irel[0].r_addend = addend; // Bytes, not octets |
erel += reldata->count * bed->s->sizeof_rela; |
(*bed->s->swap_reloca_out) (output_bfd, irel, erel); |
} |
@@ -10261,7 +10269,7 @@ |
else |
{ |
s = elf_shdrp[elfsec]->bfd_section; |
- return s->output_section->vma + s->output_offset; |
+ return s->output_section->vma + s->output_offset; // Bytes, not octets |
} |
} |
|
@@ -10364,15 +10372,14 @@ |
compare_link_order); |
|
/* Change the offsets of the sections. */ |
- offset = 0; |
+ offset = 0; // Octets |
for (n = 0; n < seen_linkorder; n++) |
{ |
s = sections[n]->u.indirect.section; |
- offset &= ~(bfd_vma) 0 << s->alignment_power; |
- s->output_offset = offset; |
- sections[n]->offset = offset; |
- /* FIXME: octets_per_byte. */ |
- offset += sections[n]->size; |
+ offset &= ~(bfd_vma) 0 << s->alignment_power; // Octets |
+ s->output_offset = offset / bfd_octets_per_byte(abfd); // into bytes |
+ sections[n]->offset = offset; // Octets again |
+ offset += sections[n]->size; // Octets |
} |
|
free (sections); |
@@ -11409,10 +11416,10 @@ |
continue; |
if (strcmp (o->name, ".dynstr") != 0) |
{ |
- /* FIXME: octets_per_byte. */ |
if (! bfd_set_section_contents (abfd, o->output_section, |
o->contents, |
- (file_ptr) o->output_offset, |
+ (file_ptr) o->output_offset |
+ * bfd_octets_per_byte(abfd), |
o->size)) |
goto error_return; |
} |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/hosts/zipbsd.h binutils-2.25/bfd/hosts/zipbsd.h |
+// #include "elf32-target.h" |
+// |
diff -Naur binutils-2.25-original/bfd/hosts/zipbsd.h binutils-2.25/bfd/hosts/zipbsd.h |
--- binutils-2.25-original/bfd/hosts/zipbsd.h 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/bfd/hosts/zipbsd.h 2016-02-04 21:13:23.750852163 -0500 |
@@ -0,0 +1,50 @@ |
1992,7 → 808,7
+#define NO_CORE_COMMAND |
+ |
+#endif /* _ZIPBSD_H */ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/libbfd.h binutils-2.25/bfd/libbfd.h |
diff -Naur binutils-2.25-original/bfd/libbfd.h binutils-2.25/bfd/libbfd.h |
--- binutils-2.25-original/bfd/libbfd.h 2014-11-04 04:54:41.000000000 -0500 |
+++ binutils-2.25/bfd/libbfd.h 2016-02-04 21:12:06.487473383 -0500 |
@@ -2953,6 +2953,18 @@ |
2014,7 → 830,7
"@@overflow: BFD_RELOC_UNUSED@@", |
}; |
#endif |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/Makefile.am binutils-2.25/bfd/Makefile.am |
diff -Naur binutils-2.25-original/bfd/Makefile.am binutils-2.25/bfd/Makefile.am |
--- binutils-2.25-original/bfd/Makefile.am 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/bfd/Makefile.am 2016-02-04 21:12:06.487473383 -0500 |
@@ -166,7 +166,8 @@ |
2053,7 → 869,7
elf32.c \ |
elflink.c \ |
elfxx-sparc.c \ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/Makefile.in binutils-2.25/bfd/Makefile.in |
diff -Naur binutils-2.25-original/bfd/Makefile.in binutils-2.25/bfd/Makefile.in |
--- binutils-2.25-original/bfd/Makefile.in 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/bfd/Makefile.in 2016-02-04 21:12:06.487473383 -0500 |
@@ -467,7 +467,8 @@ |
2092,27 → 908,10
elf32.c \ |
elflink.c \ |
elfxx-sparc.c \ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/reloc.c binutils-2.25/bfd/reloc.c |
diff -Naur 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 |
@@ -1362,7 +1362,7 @@ |
} |
|
return _bfd_relocate_contents (howto, input_bfd, relocation, |
- contents + address); |
+ contents + address * bfd_octets_per_byte(input_bfd)); |
} |
|
/* Relocate a given location using a given value and howto. */ |
@@ -1524,6 +1524,7 @@ |
bfd_put_16 (input_bfd, x, location); |
break; |
case 4: |
+ // Location is WRONG here |
bfd_put_32 (input_bfd, x, location); |
break; |
case 8: |
@@ -7325,7 +7326,36 @@ |
+++ binutils-2.25/bfd/reloc.c 2016-02-04 21:12:06.491473352 -0500 |
@@ -7325,7 +7325,36 @@ |
BFD_RELOC_EPIPHANY_IMM8 |
ENUMDOC |
Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. |
2150,24 → 949,7
|
ENDSENUM |
BFD_RELOC_UNUSED |
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/syms.c binutils-2.25/bfd/syms.c |
--- binutils-2.25-original/bfd/syms.c 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/bfd/syms.c 2016-02-21 19:49:49.593989776 -0500 |
@@ -1081,11 +1081,11 @@ |
return FALSE; |
} |
|
- val = bfd_get_32 (abfd, info->stabs + r->address); |
+ val = bfd_get_32 (abfd, info->stabs + r->address * bfd_octets_per_byte(abfd)); |
val &= r->howto->src_mask; |
sym = *r->sym_ptr_ptr; |
val += sym->value + sym->section->vma + r->addend; |
- bfd_put_32 (abfd, (bfd_vma) val, info->stabs + r->address); |
+ bfd_put_32 (abfd, (bfd_vma) val, info->stabs + r->address * bfd_octets_per_byte(abfd)); |
} |
} |
|
diff -Naur '--exclude=*.swp' binutils-2.25-original/bfd/targets.c binutils-2.25/bfd/targets.c |
diff -Naur binutils-2.25-original/bfd/targets.c binutils-2.25/bfd/targets.c |
--- binutils-2.25-original/bfd/targets.c 2014-11-04 04:54:41.000000000 -0500 |
+++ binutils-2.25/bfd/targets.c 2016-02-04 21:12:06.491473352 -0500 |
@@ -892,6 +892,7 @@ |
2187,7 → 969,7
#endif /* not SELECT_VECS */ |
|
/* Always support S-records, for convenience. */ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/binutils/readelf.c binutils-2.25/binutils/readelf.c |
diff -Naur binutils-2.25-original/binutils/readelf.c binutils-2.25/binutils/readelf.c |
--- binutils-2.25-original/binutils/readelf.c 2014-12-23 03:47:10.000000000 -0500 |
+++ binutils-2.25/binutils/readelf.c 2016-02-04 21:12:06.491473352 -0500 |
@@ -154,6 +154,7 @@ |
2253,7 → 1035,7
return reloc_type == 0; |
case EM_AARCH64: |
return reloc_type == 0 || reloc_type == 256; |
diff -Naur '--exclude=*.swp' binutils-2.25-original/config.sub binutils-2.25/config.sub |
diff -Naur binutils-2.25-original/config.sub binutils-2.25/config.sub |
--- binutils-2.25-original/config.sub 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/config.sub 2016-02-04 21:12:13.283418736 -0500 |
@@ -314,7 +314,7 @@ |
2285,7 → 1067,7
none) |
basic_machine=none-none |
os=-none |
diff -Naur '--exclude=*.swp' binutils-2.25-original/configure.ac binutils-2.25/configure.ac |
diff -Naur binutils-2.25-original/configure.ac binutils-2.25/configure.ac |
--- binutils-2.25-original/configure.ac 2014-12-23 09:38:42.000000000 -0500 |
+++ binutils-2.25/configure.ac 2016-02-04 21:12:13.303418575 -0500 |
@@ -1165,6 +1165,9 @@ |
2298,58 → 1080,10
esac |
|
# If we aren't building newlib, then don't build libgloss, since libgloss |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/app.c binutils-2.25/gas/app.c |
--- binutils-2.25-original/gas/app.c 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/gas/app.c 2016-02-18 20:03:11.233908743 -0500 |
@@ -468,7 +468,7 @@ |
next output character in the appropriate state. */ |
switch (state) |
{ |
- case -1: |
+ case -1: // Need to copy from out_string, not input file |
ch = *out_string++; |
if (*out_string == '\0') |
{ |
@@ -478,7 +478,7 @@ |
PUT (ch); |
continue; |
|
- case -2: |
+ case -2: // While in slash-star, star-slash comment |
for (;;) |
{ |
do |
@@ -515,7 +515,7 @@ |
UNGET (' '); |
continue; |
|
- case 4: |
+ case 4: // After putting out .linefile, put out digits |
ch = GET (); |
if (ch == EOF) |
goto fromeof; |
@@ -529,7 +529,7 @@ |
{ |
quotechar = ch; |
state = 5; |
- old_state = 3; |
+ old_state = 3; // But ... the old state was 4 ... ?? |
PUT (ch); |
} |
else |
@@ -542,7 +542,7 @@ |
} |
continue; |
|
- case 5: |
+ case 5: // Parse a string |
/* We are going to copy everything up to a quote character, |
with special handling for a backslash. We try to |
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 |
diff -Naur 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 |
@@ -0,0 +1,2258 @@ |
+++ binutils-2.25/gas/config/tc-zip.c 2016-02-04 21:25:32.565050429 -0500 |
@@ -0,0 +1,2110 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
+// Filename: tc-zip.c |
2411,13 → 1145,11
+const char EXP_CHARS[] = "eE"; |
+ |
+static int vliw_mergable = 0; // tc_check_label, tc_frob_label |
+static int zip_param_got = 0, zip_param_vliw = 0; |
+ |
+void md_begin(void) { |
+ vliw_mergable = 0; |
+ record_alignment(text_section, 2); |
+ record_alignment(data_section, 2); |
+ lex_type['('] = lex_type['A']; |
+} |
+ |
+void md_end(void) { } |
2495,16 → 1227,6
+ return nw; |
+} |
+ |
+static unsigned int |
+zip_brev(unsigned int v) { |
+ int r=0, b; |
+ |
+ for(b=0; b<32; b++, v>>=1) |
+ r = (r<<1)|(v&1); |
+ |
+ return r; |
+} |
+ |
+/* |
+ * Option processing |
+ * |
2541,6 → 1263,8
+ * |
+ * |
+ */ |
+static int zip_param_got = 0, zip_param_vliw = 0; |
+ |
+#define OPTION_VLIW (OPTION_MD_BASE+1) |
+#define OPTION_GOT (OPTION_MD_BASE+2) |
+ |
2557,9 → 1281,9
+ * are empty. |
+ */ |
+int |
+md_parse_option(int c, char *arg ATTRIBUTE_UNUSED) |
+md_parse_option(int c, char *arg) |
+{ |
+ // printf("Option %d, %s\n", c, (arg)?arg : "(Null)"); |
+ printf("Option %d, %s\n", c, (arg)?arg : "(Null)"); |
+ if (c==0) |
+ return 1; |
+ switch(c) { |
2574,12 → 1298,7
+void |
+md_show_usage(FILE *stream ATTRIBUTE_UNUSED) |
+{ |
+ fprintf(stream, _("Zip CPU options:\n")); |
+ fprintf(stream, _("\n" |
+"-vliw\t\tAttempt to compress instructions into two instructions per word.\n")); |
+ //fprintf(stream, _( |
+// "-got\t\tGenerate position independent code by referencing all symbols\n" |
+// "\t\tthrough a Global Offset Table.\n")); |
+#warning "I need to fill this section out" |
+} |
+ |
+ |
2726,11 → 1445,8
+ } |
+ |
+ if (strcasecmp(ustr, "GBL")==0) { |
+ *regid = userreg + 11; |
+ *regid = userreg + 12; |
+ ustr += 3; |
+ } else if (strcasecmp(ustr, "FP")==0) { |
+ *regid = userreg + 12; |
+ ustr += 2; |
+ } else if (strcasecmp(ustr, "SP")==0) { |
+ *regid = userreg + 13; |
+ ustr += 2; |
2862,16 → 1578,10
+ insn->i_imm = -insn->i_imm; |
+ } else if ((*ptr)&&( |
+ (isalpha(*ptr)) |
+ ||('*'==*ptr) |
+ ||('.'==*ptr) |
+ ||('_'==*ptr))) { |
+ // We start with an identifier |
+ // printf("OP-B ( \'%s\' ) starts with an identifier (%c)\n", |
+ // bop, *ptr); |
+ |
+ // Skip the compiler inserted prefix |
+ if ('*' == *ptr) |
+ ptr++; |
+ while((*ptr)&&( |
+ (isalpha(*ptr)) |
+ ||(isdigit(*ptr)) |
3013,7 → 1723,6
+ const char *err = NULL, *opstr = NULL; |
+ char *alt; |
+ int i; |
+ char *cndp = NULL; |
+ |
+#ifdef ZIP_DEBUG |
+ printf("**** Parsing %s\n", line); |
3033,25 → 1742,10
+ // The opcode is given between whitespace and a period, or whitespace |
+ // and whitespace |
+ alt = strdup(zip_skip_white_spaces(line)); |
+ if ((*alt)=='(') { |
+ // Instruction starts with condition codes-- a feature we |
+ // needed to add in order to support GCC conditional execution |
+ // macro |
+ cndp = strtok(alt,") \t")+1; |
+ if (!cndp) |
+ return "Mismatched parenthesis--an attempt at a condition?"; |
+ if (strlen(cndp) > 2) |
+ return "Invalid condition (too long)"; |
+ |
+ opstr = strtok(NULL, " \t"); |
+ if (!opstr) |
+ return "Condition not followed by valid opcode"; |
+ } else { |
+ opstr = strtok(alt, " \t"); // Get our opcode |
+ if (!opstr) { |
+ free(alt); |
+ return "Invalid Instruction"; |
+ } |
+ opstr = strtok(alt, " \t."); // Get our opcode |
+ if (!opstr) { |
+ free(alt); |
+ return "Invalid Instruction"; |
+ } |
+ |
+ typedef enum { |
3060,7 → 1754,6
+ BACKWARDS_TWO, // Only used by STO REG,Off(REG) |
+ NO_OP, // Used by NOOP, BUSY, HALT, RTU,LOCK,BREAK,etc |
+ ONE_OR_TWO_OP, // Only used by TST |
+ MAYBE_ONE_IMM, // Only used by BREAK |
+ ONE_REGISTER, // Only used by CLR, CLRF, and NOT |
+ OP_ADDRESS, // Only used by BRA, BRA.C, and LINK |
+ OP_B, // Only used by TRAP and JMP |
3070,26 → 1763,6
+ |
+ FORMTYPE insn_form = ILLEGAL_FORM; // Make sure we set this |
+ |
+ // See if our token contains a '.' within it |
+ // GCC allows conditions beginning a line, as in ... |
+ // (CND) Opcode B,A |
+ // such a condition, if present, was detected above. |
+ // |
+ // If not, we now look for a condition written in our original |
+ // format of ... |
+ // Opcode.CND B,A |
+ // and we look for it here. |
+ // |
+ if (!cndp) { |
+ cndp = strchr(opstr, '.'); |
+ // If we found such a condition, we need to fix the opstr |
+ // so that it no longer includes the condition. Hence, let's |
+ // place a NULL within the alt string and push our condition |
+ // forward to the first non '.' value. |
+ if (cndp) |
+ *cndp++ = '\0'; |
+ } |
+ |
+ if (strcasecmp(opstr, "SUB")==0) { |
+ insn->i_op = ZIPO_SUB; |
+ insn_form = TWO_OP; |
3143,8 → 1816,7
+ } else if (strcasecmp(opstr, "CMP")==0) { |
+ insn->i_op = ZIPO_CMP; |
+ insn_form = TWO_OP; |
+ } else if ((strcasecmp(opstr, "TST")==0) |
+ ||(strcasecmp(opstr, "TEST")==0)) { |
+ } else if (strcasecmp(opstr, "TST")==0) { |
+ insn->i_op = ZIPO_TST; |
+ insn_form = ONE_OR_TWO_OP; |
+ } else if (strcasecmp(opstr, "LOD")==0) { |
3184,11 → 1856,9
+ ||(strcasecmp(opstr, "NOOP")==0)) { |
+ insn->i_op = ZIPO_NOOP; |
+ insn_form = NO_OP; |
+ } else if ((strcasecmp(opstr, "BRK")==0) |
+ ||(strcasecmp(opstr, "BREAK")==0)) { |
+ } else if (strcasecmp(opstr, "BREAK")==0) { |
+ insn->i_op = ZIPO_BREAK; |
+ insn->i_imm= 0; |
+ insn_form = MAYBE_ONE_IMM; |
+ insn_form = NO_OP; |
+ } else if (strcasecmp(opstr, "LOCK")==0) { |
+ insn->i_op = ZIPO_LOCK; |
+ insn_form = NO_OP; |
3275,11 → 1945,16
+ return "Unrecognized op-code"; |
+ } |
+ |
+ if (cndp) { |
+ // Now, look for the (optional) condition |
+ const char *cndp = strchr(line, '.'); |
+ if ((cndp)&&(cndp-line >= (long)strlen(opstr)) |
+ // It must immediately follow the OpCode on the line |
+ &&(strncasecmp(opstr, cndp-strlen(opstr), strlen(opstr))==0)) { |
+ // We have a condition |
+ if (insn->i_cnd != ZIPC_ALWAYS) { |
+ err = "Instruction cannot take an additional condition"; |
+ } else { |
+ cndp = strtok(NULL, " \t"); |
+ if (strcasecmp(cndp, "LT")==0) { |
+ insn->i_cnd = ZIPC_LT; |
+ } else if (strcasecmp(cndp, "Z")==0) { |
3343,15 → 2018,6
+ if (!err) |
+ err = zip_parse_bop(right,insn); |
+ break; |
+ case MAYBE_ONE_IMM: |
+ if (NULL != right) |
+ err = "Wrong number of operands!"; |
+ else if (left) { |
+ err = zip_parse_bop(left,insn); |
+ if ((!err)&&(insn->i_breg != ZIP_RNONE)) |
+ err = "BREAK arguments can only be immediates"; |
+ } |
+ break; |
+ case NO_OP: |
+ if ((NULL != left)||(NULL != right)) |
+ err = "Wrong number of operands!"; |
3488,7 → 2154,7
+ insn->i_op = ZIPO_FPSUB; |
+ insn->i_areg = ZIP_PC; |
+ insn->i_breg = ZIP_RNONE; |
+ // insn->i_imm = 0; |
+ insn->i_imm = 0; |
+ break; |
+ case ZIPO_LOCK: |
+ insn->i_op = ZIPO_FPMUL; |
3550,14 → 2216,9
+/* |
+ * VLIW support code |
+ * |
+ * Assuming that the instruction (a) is not a VLIW instruction, this looks |
+ * up the immediate value encoded in the instruction. The purpose is to |
+ * determine whether or not this instruction can be merged with the |
+ * previous (or next) instruction in VLIW mode. |
+ * |
+ */ |
+static int |
+zip_non_vliw_immediate(const unsigned a) |
+zip_immediate(const unsigned a) |
+{ |
+ ZIP_OPCODE op = (ZIP_OPCODE)((a>>22)&0x1f); |
+ int imm; |
3629,7 → 2290,7
+ case ZIPO_LDILO: case ZIPO_LDIHI: |
+ // LDIxx instructions have only immediates. If the |
+ // immediate doesn't fit in 5 bits, this won't work. |
+ imma = zip_non_vliw_immediate(a); |
+ imma = zip_immediate(a); |
+ if ((imma > 15)||(imma < -16)) |
+ return 0; |
+ break; |
3657,7 → 2318,7
+ case ZIPO_LDILO: case ZIPO_LDIHI: |
+ // LDIxx instructions have only immediates. If the |
+ // immediate doesn't fit in 5 bits, this won't work. |
+ immb = zip_non_vliw_immediate(b); |
+ immb = zip_immediate(b); |
+ if ((immb > 15)||(immb < -16)) |
+ return 0; |
+ break; |
3766,13 → 2427,9
+ |
+ symv += fragP->fr_offset; |
+ |
+#ifdef ZIP_DEBUG |
+ printf("Determined symbol is %sin this frag, and %sin this segment\n", (this_frag)?"":"not ", (this_segment)?"":"not "); |
+#endif |
+ |
+ if ((stretch != 0) |
+ &&( sym_frag->relax_marker != fragP->relax_marker) |
+ &&(this_segment)) { |
+ &&(S_GET_SEGMENT(sym)==seg)) { |
+ if ((stretch < 0) |
+ ||(sym_frag->region == fragP->region)) |
+ symv += stretch; |
3819,22 → 2476,19
+ ||((this_segment)&&(fragP->fr_address != 0)) |
+ ); |
+ */ |
+ sym_known = (sym_defined)&&(insn->i_rp->r_pcrel)&&(this_segment); |
+ if ((sym_defined)&&(S_GET_SEGMENT(sym)==absolute_section) |
+ &&(!S_FORCE_RELOC(sym, 0))) |
+ sym_known = 1; |
+ if ((sym_defined)&&(this_segment)&&(!S_FORCE_RELOC(sym, 0))) |
+ sym_known = 1; |
+ sym_known = (sym_defined) && |
+ ((!S_FORCE_RELOC(sym, 0)) |
+ ||((insn->i_rp->r_pcrel)&&(this_segment))); |
+ //((S_GET_SEGMENT(sym) == absolute_section) ||(this_segment))); |
+#ifdef ZIP_DEBUG |
+ if (sym_known) |
+ printf("%08lx@%08lx/%08lx - SYM(%s)-KNOWN %s%s%s%s%s\n", |
+ printf("%08lx@%08lx/%08lx - SYM(%s)-KNOWN %s%s%s%s\n", |
+ (unsigned long)fragP->fr_literal, fragP->fr_address/OCTETS_PER_BYTE, |
+ (unsigned long)symv, S_GET_NAME(sym), |
+ (S_GET_SEGMENT(sym) == absolute_section)?" abs":"", |
+ (S_GET_SEGMENT(sym) == expr_section)?" expr":"", |
+ (this_frag)?" this-frag ":"", |
+ ((this_segment)&&(fragP->fr_address != 0))?" this-seg ":"", |
+ insn->i_rp->r_pcrel?" (PC-REL)":" (ABS)"); |
+ ((this_segment)&&(fragP->fr_address != 0))?" this-seg ":""); |
+ else if (insn->i_rp) |
+ printf("%08lx@%08lx/%08lx - SYM(%s) -- not known (yet) %s%s%s%s%s%s\n", |
+ (unsigned long)fragP->fr_literal, fragP->fr_address/OCTETS_PER_BYTE, |
3866,8 → 2520,7
+ |
+ |
+ insn->i_aux[0] = 0x7e000000; // NOOP -- if never used. |
+ if (insn->i_rp) |
+ insn->i_imm = symv; |
+ insn->i_imm = symv; |
+ if ((insn->i_cnd == ZIPC_ALWAYS) |
+ // and either no symbol, or we know the symbol |
+ &&((!insn->i_rp)||(sym_known)) |
3879,18 → 2532,6
+ |(insn->i_imm & 0x07fffff); |
+ if (insn->i_rp) |
+ insn->i_rp->r_type = BFD_RELOC_NONE; |
+ } else if (((!insn->i_rp)||(sym_known)) |
+ &&(fits_within(18, zip_brev(insn->i_imm)))) { |
+ // Can we do this with a BREV instruction using an |
+ // immediate? If so, we can then conditionally load |
+ // the top 18 bist of any value ... |
+ // |
+ insn->i_naux = 0; |
+ insn->i_code = IMMOP(ZIPO_BREV, insn->i_cnd, |
+ zip_brev(insn->i_imm), |
+ insn->i_areg&0x0f); |
+ if (insn->i_rp) |
+ insn->i_rp->r_type = BFD_RELOC_NONE; |
+ } else { |
+ // |
+ // If the symbol isn't defined, then any i_imm value |
3961,6 → 2602,7
+ insn->i_aux[0]=IMMOP(ZIPO_ADD,ZIPC_ALWAYS, |
+ 1,ZIP_PC); // Skip an instruction |
+ insn->i_aux[1] = 0; |
+ insn->i_rp->r_type = BFD_RELOC_ZIP_VALUE; |
+ if (!insn->i_rp) |
+ as_bad("Out of bounds branch"); |
+ else { // While we want a PC relative branch, |
4168,7 → 2810,7
+ // md_number_to_chars(f, insn->insn_code, 4); // ??? |
+ // |
+ // |
+ if ((!insn->i_rp)&&(vliw_mergable)&&(insn->i_naux == 0)&&(frag_now_fix_octets()>=4)) { |
+ if ((!insn->i_rp)&&(vliw_mergable)&&(insn->i_naux == 0)) { |
+ // ZIPI lcode = md_number_from_chars(p, 4); |
+ unsigned int last_iword; |
+ char *buf; |
4215,22 → 2857,8
+ insn->i_rp = NULL; |
+ } |
+ } else { |
+ // First, grow our fragment so we know we have the |
+ // size we'll need. |
+ frag_grow(OCTETS_PER_BYTE*(1+insn->i_naux)); |
+ |
+ // Then p, the place where we'd get more from, is |
+ // where our instruction will be installed. We know |
+ // there's room for it there now. |
+ p = frag_more(0); |
+ // Record where in the frag our relaxable instruction |
+ // will be installed |
+ insn->i_rp->r_fr_offset = ( p - frag_now->fr_literal ) / OCTETS_PER_BYTE; |
+ // Now tell the assembler about what we've done. |
+ // This'll close off the frag as well, so this is the |
+ // last we'll see of this frag--even though frag_now |
+ // may yet point to it (or not) for a while. |
+ frag_var(rs_machine_dependent, // Relaxation type |
+ fragS * last_frag = frag_now; |
+ p = frag_var(rs_machine_dependent, // Relaxation type |
+ OCTETS_PER_BYTE*(1+insn->i_naux), |
+ OCTETS_PER_BYTE*(1+insn->i_naux), |
+ rs_machine_dependent, // Subtype |
4237,7 → 2865,7
+ insn->i_rp->r_sym, // Symbol |
+ 0, // Offset (to be added to symbol) |
+ (char *)zip_copy_insn(insn)); // Opcode |
+ |
+ insn->i_rp->r_fr_offset = ( p - last_frag->fr_literal ) / OCTETS_PER_BYTE; |
+ } |
+ md_number_to_chars(p, insn->i_code, OCTETS_PER_BYTE); |
+ for(i=0; i< insn->i_naux; i++) |
4314,13 → 2942,12
+ (*val) &= 0x0ffffffff; |
+ |
+#ifdef ZIP_DEBUG |
+ printf("MD-APPLY-FIX: FRAG=%08x@%08x+%08x(%d), IWORD = %08x Val=%08x (RTYP=%d->%s)%s%s\n", |
+ printf("MD-APPLY-FIX: FRAG=%08x@%08x+%08x(%d), IWORD = %08x Val=%08x (RTYP = %d)%s%s\n", |
+ ((unsigned)((unsigned long)fixP->fx_frag->fr_literal)), |
+ ((unsigned)((unsigned long)fixP->fx_frag->fr_address)), |
+ ((unsigned)((unsigned long)fixP->fx_where)), |
+ ((unsigned)((unsigned long)fixP->fx_size)), |
+ iword, (unsigned)(*val), fixP->fx_r_type, |
+ bfd_get_reloc_code_name(fixP->fx_r_type), |
+ (fixP->fx_pcrel)?" PC-Rel ":" std ", |
+ (fixP->fx_addsy)?"":"(Null Sym)"); |
+#endif |
4416,9 → 3043,9
+arelent * |
+tc_gen_reloc(asection *section ATTRIBUTE_UNUSED, fixS *fixP) |
+{ |
+//#ifdef ZIP_DEBUG |
+// printf("Call to TC-GEN-RELOC(%s,FIX);\n", segment_name(section)); |
+//#endif |
+#ifdef ZIP_DEBUG |
+ printf("Call to TC-GEN-RELOC(%s,FIX);\n", segment_name(section)); |
+#endif |
+ |
+ arelent *relP; |
+ |
4427,18 → 3054,7
+ relP->sym_ptr_ptr = (asymbol **)xmalloc(sizeof(asymbol *)); |
+ *relP->sym_ptr_ptr = symbol_get_bfdsym(fixP->fx_addsy); |
+ relP->address = (fixP->fx_frag->fr_address + fixP->fx_where)/OCTETS_PER_BYTE; |
+ // The addend value is added to the symbols value after the value is |
+ // is resolved. It is useful for PC relative addressing. However, |
+ // in general (based on observing bfd/*), it seems to just muck things |
+ // up. |
+ // relP->addend = 0; |
+ // I had it set before where this was set to fixP->fx_offset |
+ // relP->addend = fixP->fx_offset; // |
+ // I just can't see any reasonable reason for doing so. |
+ // On the other hand, since I set this field to zero in fx_new, and |
+ // it's an allowable offset to a valid symbol value, let's maintain that |
+ // capability--only it's just a capability we're not using. |
+ relP->addend = fixP->fx_offset; |
+ relP->addend = fixP->fx_offset; /// ???? Or should this be fixP->fx_addnumber?? |
+ relP->howto = bfd_reloc_type_lookup(stdoutput, fixP->fx_r_type); |
+ if (! relP->howto) { |
+ const char *name; |
4453,7 → 3069,7
+ |
+int |
+zip_estimate_size_before_relax(fragS *fragP, segT seg) { |
+ ZIPIS *insn = (ZIPIS *)(fragP->fr_opcode); |
+ ZIPIS *insn = (ZIPIS *)fragP->fr_opcode; |
+ offsetT last_fix = fragP->fr_fix; |
+ |
+ zip_assemble_insn_words(fragP, seg, insn, 1, 0); |
4462,8 → 3078,7
+ // relaxations. We need to return the difference between that |
+ // new estimate of total size and the current value of fragP->fr_fix. |
+#ifdef ZIP_DEBUG |
+ printf("(%s): SZ-ESTIMATE %3ld + %d*(1+%d) - %3ld = %3ld\n", |
+ S_GET_NAME(insn->i_rp->r_sym), |
+ printf("SZ-ESTIMATE %3ld + %d*(1+%d) - %3ld = %3ld\n", |
+ insn->i_rp->r_fr_offset, OCTETS_PER_BYTE, insn->i_naux, |
+ fragP->fr_fix, |
+ ((insn->i_rp->r_fr_offset + 1+insn->i_naux))*OCTETS_PER_BYTE - fragP->fr_fix); |
4475,55 → 3090,32
+ |
+#define RELAX_STATE(FRAG) (FRAG->fr_subtype) |
+long |
+zip_relax_frag(segT seg, fragS *fragP, long stretch) |
+zip_relax_frag(segT seg, fragS *fragP, |
+ long stretch) |
+{ |
+ ZIPIS *insn = (ZIPIS *)(fragP->fr_opcode); |
+ ZIPIS *insn = (ZIPIS *)fragP->fr_opcode; |
+ char *p =&fragP->fr_literal[insn->i_rp->r_fr_offset * OCTETS_PER_BYTE]; |
+ long growth; |
+ int i, old_naux = insn->i_naux; |
+ |
+#ifdef ZIP_DEBUG |
+ fprintf(stderr, "--- FIX --- @%08x/%08x, Sym %s (zip_relax_frag), stretch = %ld/offset = %08lx\n", |
+ printf("--- FIX --- @%08x/%08x, Sym %s (zip_relax_frag), stretch = %ld\n", |
+ (int)((long)(fragP->fr_literal)), |
+ (unsigned)fragP->fr_address, |
+ (insn->i_rp->r_sym)? S_GET_NAME(insn->i_rp->r_sym) |
+ :"(Null)", |
+ stretch, insn->i_rp->r_fr_offset); |
+ stretch); |
+ // zip_dump_insn(insn); |
+#endif |
+ |
+ { |
+ fragS *lclfP; |
+ for(lclfP = fragP; lclfP; lclfP = lclfP->fr_next) |
+ gas_assert(lclfP->fr_type < 256); |
+ } |
+ |
+ // We need to rebuild the instruction since we could relax it |
+ // multiple times |
+ zip_assemble_insn_words(fragP, seg, insn, 1, stretch); |
+ { |
+ fragS *lclfP; |
+ for(lclfP = fragP; lclfP; lclfP = lclfP->fr_next) |
+ gas_assert(lclfP->fr_type < 256); |
+ } |
+ |
+ md_number_to_chars(p, insn->i_code, OCTETS_PER_BYTE); |
+ { |
+ fragS *lclfP; |
+ for(lclfP = fragP; lclfP; lclfP = lclfP->fr_next) |
+ gas_assert(lclfP->fr_type < 256); |
+ } |
+ |
+ for(i=0; i< insn->i_naux; i++) |
+ md_number_to_chars(&p[OCTETS_PER_BYTE*(1+i)], insn->i_aux[i], |
+ OCTETS_PER_BYTE); |
+ |
+ { |
+ fragS *lclfP; |
+ for(lclfP = fragP; lclfP; lclfP = lclfP->fr_next) |
+ gas_assert(lclfP->fr_type < 256); |
+ } |
+ |
+ // The change in size of this fragment |
+ growth = (insn->i_naux - old_naux) * OCTETS_PER_BYTE; |
+#ifdef ZIP_DEBUG |
4532,12 → 3124,6
+ gas_assert(fragP->fr_fix >= 0); |
+ gas_assert(fragP->fr_fix + growth>= 0); |
+#endif |
+ { |
+ fragS *lclfP; |
+ for(lclfP = fragP; lclfP; lclfP = lclfP->fr_next) |
+ gas_assert(lclfP->fr_type < 256); |
+ } |
+ |
+ return growth; |
+} |
+ |
4608,10 → 3194,10
+ } |
+ } |
+} |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/config/tc-zip.h binutils-2.25/gas/config/tc-zip.h |
diff -Naur binutils-2.25-original/gas/config/tc-zip.h binutils-2.25/gas/config/tc-zip.h |
--- binutils-2.25-original/gas/config/tc-zip.h 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/gas/config/tc-zip.h 2016-02-21 12:53:04.848523892 -0500 |
@@ -0,0 +1,206 @@ |
+++ binutils-2.25/gas/config/tc-zip.h 2016-02-04 21:26:05.332792602 -0500 |
@@ -0,0 +1,194 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
+// Filename: tc-zip.h |
4708,23 → 3294,11
+ */ |
+#define TC_ADDRESS_BYTES zip_address_bytes |
+ |
+/* TC_PREDICATE_START_CHAR ... I can't find this in the documentation, but I'm |
+ * guessing if a line begins with this character, the line beginning will be |
+ * taken care of specially. |
+ */ |
+#define TC_PREDICATE_START_CHAR '(' |
+#define TC_PREDICATE_END_CHAR ')' |
+ |
+ |
+/* Accept numbers with a suffix, e.g. 0ffffh, 1010b. --- from TI-c4x code */ |
+// #define NUMBERS_WITH_SUFFIX 1 |
+/* md_cons_align ... You may define this macro to do any special alignment |
+ * before a data allocation pseudo-op. |
+ */ |
+#define md_cons_align(N) zip_cons_align(N) |
+ |
+/* TI implements the tic4x_do_align --- do we need it? */ |
+ |
+/* This macro is the BFD target name to use when creating the output |
+* file. This will normally depend upon the OBJ_FMT macro. */ |
+#define TARGET_FORMAT "elf32-zip" |
4818,7 → 3392,7
+ |
+#endif |
+ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/configure.tgt binutils-2.25/gas/configure.tgt |
diff -Naur binutils-2.25-original/gas/configure.tgt binutils-2.25/gas/configure.tgt |
--- binutils-2.25-original/gas/configure.tgt 2014-10-14 03:32:03.000000000 -0400 |
+++ binutils-2.25/gas/configure.tgt 2016-02-04 21:28:02.491872737 -0500 |
@@ -110,6 +110,7 @@ |
4838,48 → 3412,7
*-*-aout | *-*-scout) fmt=aout ;; |
*-*-dragonfly*) fmt=elf em=dragonfly ;; |
*-*-freebsd* | *-*-kfreebsd*-gnu) fmt=elf em=freebsd ;; |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/frags.c binutils-2.25/gas/frags.c |
--- binutils-2.25-original/gas/frags.c 2014-10-14 03:32:03.000000000 -0400 |
+++ binutils-2.25/gas/frags.c 2016-02-20 18:52:07.305435296 -0500 |
@@ -125,6 +125,7 @@ |
/* Not enough room in this frag. Close it and start a new one. |
This must be done in a loop because the created frag may not |
be big enough if the current obstack chunk is used. */ |
+ |
frag_wane (frag_now); |
frag_new (0); |
} |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/macro.c binutils-2.25/gas/macro.c |
--- binutils-2.25-original/gas/macro.c 2014-10-14 03:32:03.000000000 -0400 |
+++ binutils-2.25/gas/macro.c 2016-02-18 18:45:08.562909179 -0500 |
@@ -117,6 +117,8 @@ |
size_t line_start = ptr->len; |
size_t more = get_line (ptr); |
|
+ printf("Buffer and nest, from %s\n", from); |
+ |
if (to_len == 4 && strcasecmp (to, "ENDR") == 0) |
{ |
from = NULL; |
@@ -799,6 +801,8 @@ |
formal_entry *loclist = NULL; |
const char *err = NULL; |
|
+ printf("EXPAND-MACRO\n"); |
+ |
sb_new (&t); |
|
while (src < in->len && !err) |
@@ -1031,6 +1035,8 @@ |
int is_keyword = 0; |
int narg = 0; |
const char *err = NULL; |
+ printf("EXPAND-MACRO !BODY\n"); |
+ |
|
sb_new (&t); |
|
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/Makefile.am binutils-2.25/gas/Makefile.am |
diff -Naur binutils-2.25-original/gas/Makefile.am binutils-2.25/gas/Makefile.am |
--- binutils-2.25-original/gas/Makefile.am 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/gas/Makefile.am 2016-02-04 21:12:13.355418158 -0500 |
@@ -193,6 +193,7 @@ |
4898,7 → 3431,7
config/xtensa-relax.h |
|
# OBJ files in config |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/Makefile.in binutils-2.25/gas/Makefile.in |
diff -Naur binutils-2.25-original/gas/Makefile.in binutils-2.25/gas/Makefile.in |
--- binutils-2.25-original/gas/Makefile.in 2014-10-14 03:32:02.000000000 -0400 |
+++ binutils-2.25/gas/Makefile.in 2016-02-04 21:12:13.355418158 -0500 |
@@ -462,6 +462,7 @@ |
4946,9 → 3479,9
xtensa-relax.o: config/xtensa-relax.c |
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xtensa-relax.o -MD -MP -MF $(DEPDIR)/xtensa-relax.Tpo -c -o xtensa-relax.o `test -f 'config/xtensa-relax.c' || echo '$(srcdir)/'`config/xtensa-relax.c |
@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 |
diff -Naur 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-02-05 06:48:11.911995367 -0500 |
@@ -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 |
5046,7 → 3579,7
} |
|
int |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/align2.d binutils-2.25/gas/testsuite/gas/all/align2.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/align2.d binutils-2.25/gas/testsuite/gas/all/align2.d |
--- binutils-2.25-original/gas/testsuite/gas/all/align2.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/align2.d 2016-02-04 22:06:05.190524749 -0500 |
@@ -6,4 +6,4 @@ |
5055,7 → 3588,7
Contents of section .text: |
- 0000 ff[ 0-9a-f]*[ ]+.* |
+ 0000 000000ff[ ]+.* |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/align.d binutils-2.25/gas/testsuite/gas/all/align.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/align.d binutils-2.25/gas/testsuite/gas/all/align.d |
--- binutils-2.25-original/gas/testsuite/gas/all/align.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/align.d 2016-02-05 12:16:46.347630564 -0500 |
@@ -3,6 +3,7 @@ |
5066,7 → 3599,7
|
# Test the alignment pseudo-op. |
|
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/altmac2.d binutils-2.25/gas/testsuite/gas/all/altmac2.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/altmac2.d binutils-2.25/gas/testsuite/gas/all/altmac2.d |
--- binutils-2.25-original/gas/testsuite/gas/all/altmac2.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/altmac2.d 2016-02-04 22:09:45.368750114 -0500 |
@@ -7,4 +7,4 @@ |
5075,7 → 3608,7
Contents of section .data: |
- 0000 3e3c21.* |
+ 0000 0000003e 0000003c 00000021.* |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/altmacro.d binutils-2.25/gas/testsuite/gas/all/altmacro.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/altmacro.d binutils-2.25/gas/testsuite/gas/all/altmacro.d |
--- binutils-2.25-original/gas/testsuite/gas/all/altmacro.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/altmacro.d 2016-02-04 22:08:15.501473408 -0500 |
@@ -7,5 +7,8 @@ |
5089,7 → 3622,7
+ 0008 00000032 00000033 00000021 00000021 .* |
+ 000c 0000003c 0000003e 00000027 00000021 .* |
+ 0010 0000003c 0000003e 00000027.* |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/eval.d binutils-2.25/gas/testsuite/gas/all/eval.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/eval.d binutils-2.25/gas/testsuite/gas/all/eval.d |
--- binutils-2.25-original/gas/testsuite/gas/all/eval.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/eval.d 2016-02-04 22:10:35.336348555 -0500 |
@@ -4,5 +4,6 @@ |
5100,7 → 3633,7
+ 0000 00000001 00000001 00000001 00000001 .* |
+ 0004 00000001 00000001 00000001 .* |
#pass |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/forward.d binutils-2.25/gas/testsuite/gas/all/forward.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/forward.d binutils-2.25/gas/testsuite/gas/all/forward.d |
--- binutils-2.25-original/gas/testsuite/gas/all/forward.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/forward.d 2016-02-04 21:59:38.133420172 -0500 |
@@ -4,5 +4,8 @@ |
5113,7 → 3646,7
+ 0008 00000001 00000002 00000003 00000004 ................ |
+ 000c ffffffff 00000002 00000003 fffffffc ................ |
#pass |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/fwdexp.d binutils-2.25/gas/testsuite/gas/all/fwdexp.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/fwdexp.d binutils-2.25/gas/testsuite/gas/all/fwdexp.d |
--- binutils-2.25-original/gas/testsuite/gas/all/fwdexp.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/fwdexp.d 2016-02-04 22:01:22.504640513 -0500 |
@@ -5,7 +5,7 @@ |
5126,7 → 3659,7
Contents of section .* |
- 0+ (0+|feff|fffe|fcffffff|fffffffc|f8ffffff|f8ffffff ffffffff|ffffffff fffffff8|0+4) .* |
+ 0+ (ffffffff) .* |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/incbin.d binutils-2.25/gas/testsuite/gas/all/incbin.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/incbin.d binutils-2.25/gas/testsuite/gas/all/incbin.d |
--- binutils-2.25-original/gas/testsuite/gas/all/incbin.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/incbin.d 2016-02-04 22:24:08.721646746 -0500 |
@@ -9,6 +9,6 @@ |
5139,7 → 3672,7
+ 0004 534f4d45 4d4f5245 44415441 44415441 SOMEMOREDATADATA |
+ 0008 38383838 38383838 0c313232 3333330c 88888888.122333. |
+ 000c 534f4d45 4d4f5245 44415441 44415441 SOMEMOREDATADATA |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/redef2.d binutils-2.25/gas/testsuite/gas/all/redef2.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/redef2.d binutils-2.25/gas/testsuite/gas/all/redef2.d |
--- binutils-2.25-original/gas/testsuite/gas/all/redef2.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/redef2.d 2016-02-04 22:08:54.065162857 -0500 |
@@ -7,10 +7,10 @@ |
5156,7 → 3689,7
- 0010 [01]00000[01]0 .* |
+ 0004 00000004 .* |
#pass |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/redef3.d binutils-2.25/gas/testsuite/gas/all/redef3.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/redef3.d binutils-2.25/gas/testsuite/gas/all/redef3.d |
--- binutils-2.25-original/gas/testsuite/gas/all/redef3.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/redef3.d 2016-02-04 22:03:41.499604332 -0500 |
@@ -7,10 +7,10 @@ |
5173,7 → 3706,7
- 0010 00000000 .* |
+ 0004 00000000 .* |
#pass |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/redef.d binutils-2.25/gas/testsuite/gas/all/redef.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/redef.d binutils-2.25/gas/testsuite/gas/all/redef.d |
--- binutils-2.25-original/gas/testsuite/gas/all/redef.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/redef.d 2016-02-04 22:02:12.604266754 -0500 |
@@ -4,5 +4,5 @@ |
5183,7 → 3716,7
- 0000 00000000 0[04]00000[04] 0[08]00000[08] 0[0c]00000[0c][ ]+................[ ]* |
+ 0000 00000000 00000001 00000002 00000003[ ]+................[ ]* |
#pass |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/relax.d binutils-2.25/gas/testsuite/gas/all/relax.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/relax.d binutils-2.25/gas/testsuite/gas/all/relax.d |
--- binutils-2.25-original/gas/testsuite/gas/all/relax.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/relax.d 2016-02-05 06:57:26.304026502 -0500 |
@@ -4,10 +4,10 @@ |
5201,7 → 3734,7
- 4090 09090909 09090909 09090909 09090909.* |
+ 1028 00000000 00000008 00000009 09090909.* |
#pass |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/sleb128-2.d binutils-2.25/gas/testsuite/gas/all/sleb128-2.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/sleb128-2.d binutils-2.25/gas/testsuite/gas/all/sleb128-2.d |
--- binutils-2.25-original/gas/testsuite/gas/all/sleb128-2.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/sleb128-2.d 2016-02-04 22:50:09.189463296 -0500 |
@@ -4,4 +4,4 @@ |
5210,7 → 3743,7
Contents of section (\.data|\$DATA\$): |
- .* 7d2a.* |
+ .* 7d000000 0000002a.* |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/sleb128-3.d binutils-2.25/gas/testsuite/gas/all/sleb128-3.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/sleb128-3.d binutils-2.25/gas/testsuite/gas/all/sleb128-3.d |
--- binutils-2.25-original/gas/testsuite/gas/all/sleb128-3.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/sleb128-3.d 2016-02-04 22:50:19.297389692 -0500 |
@@ -4,4 +4,4 @@ |
5219,7 → 3752,7
Contents of section (\.data|\$DATA\$): |
- .* 9c7f2a.* |
+ .* 9c7f0000 0000002a.* |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/sleb128-4.d binutils-2.25/gas/testsuite/gas/all/sleb128-4.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/sleb128-4.d binutils-2.25/gas/testsuite/gas/all/sleb128-4.d |
--- binutils-2.25-original/gas/testsuite/gas/all/sleb128-4.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/sleb128-4.d 2016-02-04 22:50:40.133237967 -0500 |
@@ -5,4 +5,4 @@ |
5228,7 → 3761,7
Contents of section (\.data|\$DATA\$): |
- .* 83808080 082a.* |
+ .* 83808080 08000000 0000002a.* |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/sleb128-5.d binutils-2.25/gas/testsuite/gas/all/sleb128-5.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/sleb128-5.d binutils-2.25/gas/testsuite/gas/all/sleb128-5.d |
--- binutils-2.25-original/gas/testsuite/gas/all/sleb128-5.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/sleb128-5.d 2016-02-04 22:50:50.381163338 -0500 |
@@ -4,4 +4,4 @@ |
5237,7 → 3770,7
Contents of section (\.data|\$DATA\$): |
- .* 012a.* |
+ .* 01000000 0000002a.* |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/sleb128-7.d binutils-2.25/gas/testsuite/gas/all/sleb128-7.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/sleb128-7.d binutils-2.25/gas/testsuite/gas/all/sleb128-7.d |
--- binutils-2.25-original/gas/testsuite/gas/all/sleb128-7.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/sleb128-7.d 2016-02-04 22:52:23.972481706 -0500 |
@@ -4,4 +4,5 @@ |
5247,7 → 3780,7
- .* cb012ac5 012acb01 2ac5012a.* |
+ .* cb010000 0000002a c5010000 0000002a.* |
+ .* cb010000 0000002a c5010000 0000002a.* |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/sleb128.d binutils-2.25/gas/testsuite/gas/all/sleb128.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/sleb128.d binutils-2.25/gas/testsuite/gas/all/sleb128.d |
--- binutils-2.25-original/gas/testsuite/gas/all/sleb128.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/sleb128.d 2016-02-04 22:45:46.155378037 -0500 |
@@ -10,21 +10,22 @@ |
5309,7 → 3842,7
+ 00.. 80808080 70000000 80808080 80804000 .* |
+ 00.. 00000000 00000000 00000000 00000000 .* |
#pass |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/string.d binutils-2.25/gas/testsuite/gas/all/string.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/string.d binutils-2.25/gas/testsuite/gas/all/string.d |
--- binutils-2.25-original/gas/testsuite/gas/all/string.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/string.d 2016-02-05 07:02:23.441937894 -0500 |
@@ -4,8 +4,11 @@ |
5328,7 → 3861,7
+ 0014 00000000 00000036 00000000 00000034 .......6.......4 |
+ 0018 00000000 00000000.* |
#pass |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/all/struct.d binutils-2.25/gas/testsuite/gas/all/struct.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/all/struct.d binutils-2.25/gas/testsuite/gas/all/struct.d |
--- binutils-2.25-original/gas/testsuite/gas/all/struct.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/all/struct.d 2016-02-04 22:04:56.639045164 -0500 |
@@ -4,5 +4,5 @@ |
5339,7 → 3872,7
-0+04 A w3 |
+0+01 A w2 |
+0+02 A w3 |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/lns/lns.exp binutils-2.25/gas/testsuite/gas/lns/lns.exp |
diff -Naur binutils-2.25-original/gas/testsuite/gas/lns/lns.exp binutils-2.25/gas/testsuite/gas/lns/lns.exp |
--- binutils-2.25-original/gas/testsuite/gas/lns/lns.exp 2014-10-14 03:32:03.000000000 -0400 |
+++ binutils-2.25/gas/testsuite/gas/lns/lns.exp 2016-02-04 21:12:13.355418158 -0500 |
@@ -30,6 +30,7 @@ |
5350,7 → 3883,7
} { |
# Use alternate file for targets using DW_LNS_fixed_advance_pc opcodes. |
if { [istarget xtensa*-*-*] |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/macros/dot.l binutils-2.25/gas/testsuite/gas/macros/dot.l |
diff -Naur binutils-2.25-original/gas/testsuite/gas/macros/dot.l binutils-2.25/gas/testsuite/gas/macros/dot.l |
--- binutils-2.25-original/gas/testsuite/gas/macros/dot.l 2014-10-14 03:32:03.000000000 -0400 |
+++ binutils-2.25/gas/testsuite/gas/macros/dot.l 2016-02-05 07:32:06.897386485 -0500 |
@@ -7,11 +7,14 @@ |
5371,7 → 3904,7
[ ]*[1-9][0-9]*[ ]+\?+[ ]+00 ?00 ?00 ?00[ ]+> \.skip 4\*2 |
[ ]*[1-9][0-9]*[ ]+00 ?00 ?00 ?00[ ]* |
[ ]*[1-9][0-9]*[ ]+> label9:label8:label7:label6: |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/macros/irp.d binutils-2.25/gas/testsuite/gas/macros/irp.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/macros/irp.d binutils-2.25/gas/testsuite/gas/macros/irp.d |
--- binutils-2.25-original/gas/testsuite/gas/macros/irp.d 2014-10-14 03:32:03.000000000 -0400 |
+++ binutils-2.25/gas/testsuite/gas/macros/irp.d 2016-02-05 07:04:12.705168814 -0500 |
@@ -8,8 +8,8 @@ |
5388,7 → 3921,7
+0+03[ ]+[a-zA-Z0-9_]+[ ]+bar1 |
+0+04[ ]+[a-zA-Z0-9_]+[ ]+bar2 |
+0+05[ ]+[a-zA-Z0-9_]+[ ]+bar3 |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/macros/paren.d binutils-2.25/gas/testsuite/gas/macros/paren.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/macros/paren.d binutils-2.25/gas/testsuite/gas/macros/paren.d |
--- binutils-2.25-original/gas/testsuite/gas/macros/paren.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/macros/paren.d 2016-02-05 07:16:00.860188859 -0500 |
@@ -5,5 +5,6 @@ |
5399,7 → 3932,7
+ 0000 00000001 00000000 00000002 00000002.* |
+ 0004 00000002 00000004 00000002.* |
#pass |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/macros/repeat.d binutils-2.25/gas/testsuite/gas/macros/repeat.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/macros/repeat.d binutils-2.25/gas/testsuite/gas/macros/repeat.d |
--- binutils-2.25-original/gas/testsuite/gas/macros/repeat.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/macros/repeat.d 2016-02-05 07:05:38.264566195 -0500 |
@@ -8,38 +8,38 @@ |
5476,7 → 4009,7
+0+21[ ]+[a-zA-Z0-9_]+[ ]+rept_rept |
+0+22[ ]+[a-zA-Z0-9_]+[ ]+rept_rept |
+0+23[ ]+[a-zA-Z0-9_]+[ ]+rept_rept |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/macros/rept.d binutils-2.25/gas/testsuite/gas/macros/rept.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/macros/rept.d binutils-2.25/gas/testsuite/gas/macros/rept.d |
--- binutils-2.25-original/gas/testsuite/gas/macros/rept.d 2014-10-14 03:32:03.000000000 -0400 |
+++ binutils-2.25/gas/testsuite/gas/macros/rept.d 2016-02-05 07:04:42.844956568 -0500 |
@@ -8,5 +8,5 @@ |
5487,7 → 4020,7
-0+08[ ]+[a-zA-Z0-9_]+[ ]+foo1 |
+0+01[ ]+[a-zA-Z0-9_]+[ ]+foo1 |
+0+02[ ]+[a-zA-Z0-9_]+[ ]+foo1 |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/macros/semi.d binutils-2.25/gas/testsuite/gas/macros/semi.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/macros/semi.d binutils-2.25/gas/testsuite/gas/macros/semi.d |
--- binutils-2.25-original/gas/testsuite/gas/macros/semi.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/macros/semi.d 2016-02-05 07:32:56.241037955 -0500 |
@@ -5,5 +5,5 @@ |
5498,7 → 4031,7
- 0010 11111111 11111111 11111111 11111111 ................ |
+ 0000 0000003b 00000020 0000003b 00000020 ...;... ...;... |
+ 0004 0000003a 00000020 0000003a 00000020 ...:... ...:... |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/macros/strings.d binutils-2.25/gas/testsuite/gas/macros/strings.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/macros/strings.d binutils-2.25/gas/testsuite/gas/macros/strings.d |
--- binutils-2.25-original/gas/testsuite/gas/macros/strings.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/macros/strings.d 2016-02-05 07:11:54.477916649 -0500 |
@@ -3,5 +3,8 @@ |
5511,7 → 4044,7
+ 0008 00000061 00000072 00000062 00000061 ...a...r...b...a |
+ 000c 0000007a[ ]*...z.* |
|
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/macros/test2.d binutils-2.25/gas/testsuite/gas/macros/test2.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/macros/test2.d binutils-2.25/gas/testsuite/gas/macros/test2.d |
--- binutils-2.25-original/gas/testsuite/gas/macros/test2.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/macros/test2.d 2016-02-05 07:03:55.221291916 -0500 |
@@ -8,5 +8,5 @@ |
5522,7 → 4055,7
-0+08[ ]+[a-zA-Z0-9_]+[ ]+foo3 |
+0+01[ ]+[a-zA-Z0-9_]+[ ]+foo2 |
+0+02[ ]+[a-zA-Z0-9_]+[ ]+foo3 |
diff -Naur '--exclude=*.swp' binutils-2.25-original/gas/testsuite/gas/macros/vararg.d binutils-2.25/gas/testsuite/gas/macros/vararg.d |
diff -Naur binutils-2.25-original/gas/testsuite/gas/macros/vararg.d binutils-2.25/gas/testsuite/gas/macros/vararg.d |
--- binutils-2.25-original/gas/testsuite/gas/macros/vararg.d 2013-11-04 10:33:38.000000000 -0500 |
+++ binutils-2.25/gas/testsuite/gas/macros/vararg.d 2016-02-05 07:06:10.756337260 -0500 |
@@ -8,8 +8,8 @@ |
5539,10 → 4072,10
+0+03[ ]+[a-zA-Z0-9_]+[ ]+foo4 |
+0+04[ ]+[a-zA-Z0-9_]+[ ]+foo5 |
+0+05[ ]+[a-zA-Z0-9_]+[ ]+foo6 |
diff -Naur '--exclude=*.swp' binutils-2.25-original/include/dis-asm.h binutils-2.25/include/dis-asm.h |
diff -Naur binutils-2.25-original/include/dis-asm.h binutils-2.25/include/dis-asm.h |
--- binutils-2.25-original/include/dis-asm.h 2014-10-14 03:32:04.000000000 -0400 |
+++ binutils-2.25/include/dis-asm.h 2016-02-21 16:39:11.605527259 -0500 |
@@ -305,9 +305,11 @@ |
+++ binutils-2.25/include/dis-asm.h 2016-02-04 21:12:13.355418158 -0500 |
@@ -305,6 +305,7 @@ |
extern int print_insn_z8002 (bfd_vma, disassemble_info *); |
extern int print_insn_rx (bfd_vma, disassemble_info *); |
extern int print_insn_rl78 (bfd_vma, disassemble_info *); |
5550,11 → 4083,7
|
extern disassembler_ftype arc_get_disassembler (void *); |
extern disassembler_ftype cris_get_disassembler (bfd *); |
+extern disassembler_ftype zip_get_disassembler (bfd *); |
|
extern void print_aarch64_disassembler_options (FILE *); |
extern void print_i386_disassembler_options (FILE *); |
diff -Naur '--exclude=*.swp' binutils-2.25-original/include/elf/common.h binutils-2.25/include/elf/common.h |
diff -Naur binutils-2.25-original/include/elf/common.h binutils-2.25/include/elf/common.h |
--- binutils-2.25-original/include/elf/common.h 2014-10-14 03:32:04.000000000 -0400 |
+++ binutils-2.25/include/elf/common.h 2016-02-04 21:12:13.355418158 -0500 |
@@ -405,6 +405,9 @@ |
5567,7 → 4096,7
/* See the above comment before you add a new EM_* value here. */ |
|
/* Values for e_version. */ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/include/elf/zip.h binutils-2.25/include/elf/zip.h |
diff -Naur binutils-2.25-original/include/elf/zip.h binutils-2.25/include/elf/zip.h |
--- binutils-2.25-original/include/elf/zip.h 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/include/elf/zip.h 2016-02-04 21:28:38.315592078 -0500 |
@@ -0,0 +1,73 @@ |
5644,7 → 4173,7
+#else |
+ |
+#endif /* _ELF_ZIP_H */ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/ld/configure.tgt binutils-2.25/ld/configure.tgt |
diff -Naur binutils-2.25-original/ld/configure.tgt binutils-2.25/ld/configure.tgt |
--- binutils-2.25-original/ld/configure.tgt 2014-10-14 03:32:04.000000000 -0400 |
+++ binutils-2.25/ld/configure.tgt 2016-02-04 21:12:13.355418158 -0500 |
@@ -770,6 +770,8 @@ |
5656,7 → 4185,7
*-*-ieee*) targ_emul=vanilla |
;; |
*-tandem-none) targ_emul=st2000 |
diff -Naur '--exclude=*.swp' binutils-2.25-original/ld/emulparams/elf32zip.sh binutils-2.25/ld/emulparams/elf32zip.sh |
diff -Naur binutils-2.25-original/ld/emulparams/elf32zip.sh binutils-2.25/ld/emulparams/elf32zip.sh |
--- binutils-2.25-original/ld/emulparams/elf32zip.sh 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/ld/emulparams/elf32zip.sh 2016-02-05 14:59:23.300894584 -0500 |
@@ -0,0 +1,50 @@ |
5710,7 → 4239,24
+COMMONPAGESIZE=0x1000 |
+EMBEDDED=yes |
+ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/ld/Makefile.am binutils-2.25/ld/Makefile.am |
diff -Naur binutils-2.25-original/ld/makdump.txt binutils-2.25/ld/makdump.txt |
--- binutils-2.25-original/ld/makdump.txt 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/ld/makdump.txt 2016-02-04 21:12:13.355418158 -0500 |
@@ -0,0 +1,13 @@ |
+make all-recursive |
+make[1]: Entering directory `/home/dan/work/rnd/zipcpu/sw/binutils-2.25/ld' |
+Making all in po |
+make[2]: Entering directory `/home/dan/work/rnd/zipcpu/sw/binutils-2.25/ld/po' |
+make[2]: Nothing to be done for `all'. |
+make[2]: Leaving directory `/home/dan/work/rnd/zipcpu/sw/binutils-2.25/ld/po' |
+make[2]: Entering directory `/home/dan/work/rnd/zipcpu/sw/binutils-2.25/ld' |
+make[2]: *** No rule to make target `scripttempl/elfzip.sc', needed by `eelf32zip.c'. Stop. |
+make[2]: *** Waiting for unfinished jobs.... |
+make[2]: Leaving directory `/home/dan/work/rnd/zipcpu/sw/binutils-2.25/ld' |
+make[1]: *** [all-recursive] Error 1 |
+make[1]: Leaving directory `/home/dan/work/rnd/zipcpu/sw/binutils-2.25/ld' |
+make: *** [all] Error 2 |
diff -Naur 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 |
@@ -269,6 +269,7 @@ |
5731,7 → 4277,7
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ |
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} |
|
diff -Naur '--exclude=*.swp' binutils-2.25-original/ld/Makefile.in binutils-2.25/ld/Makefile.in |
diff -Naur binutils-2.25-original/ld/Makefile.in binutils-2.25/ld/Makefile.in |
--- binutils-2.25-original/ld/Makefile.in 2014-10-14 03:32:04.000000000 -0400 |
+++ binutils-2.25/ld/Makefile.in 2016-02-04 21:12:13.355418158 -0500 |
@@ -577,6 +577,7 @@ |
5760,10 → 4306,10
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ |
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} |
|
diff -Naur '--exclude=*.swp' binutils-2.25-original/ld/scripttempl/elf32zip.sc binutils-2.25/ld/scripttempl/elf32zip.sc |
diff -Naur binutils-2.25-original/ld/scripttempl/elf32zip.sc binutils-2.25/ld/scripttempl/elf32zip.sc |
--- binutils-2.25-original/ld/scripttempl/elf32zip.sc 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/ld/scripttempl/elf32zip.sc 2016-02-12 22:17:11.286463743 -0500 |
@@ -0,0 +1,107 @@ |
+++ binutils-2.25/ld/scripttempl/elf32zip.sc 2016-02-05 14:59:28.908860785 -0500 |
@@ -0,0 +1,98 @@ |
+cat <<EOF |
+/******************************************************************************* |
+* |
5854,15 → 4400,6
+} |
+*/ |
+ |
+/* |
+MEMORY ... for the Arty board |
+{ |
+ blkram : ORIGIN = 0x0008000, LEN=0x0008000 |
+ flash : ORIGIN = 0x0400000, LEN=0x0400000 |
+ sram : ORIGIN = 0x4000000, LEN=0x4000000 |
+} |
+*/ |
+ |
+SECTIONS |
+{ |
+ . = ${TEXT_START_ADDRESS} |
5871,7 → 4408,37
+ .data : { *(.data) *(.bss) *(COMMON) } |
+} |
+EOF |
diff -Naur '--exclude=*.swp' binutils-2.25-original/ld/testsuite/lib/ld-lib.exp binutils-2.25/ld/testsuite/lib/ld-lib.exp |
diff -Naur binutils-2.25-original/ld/scripttempl/zip.sc binutils-2.25/ld/scripttempl/zip.sc |
--- binutils-2.25-original/ld/scripttempl/zip.sc 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/ld/scripttempl/zip.sc 2016-02-05 08:21:18.288847389 -0500 |
@@ -0,0 +1,26 @@ |
+cat <<EOF |
+OUTPUT_ARCH(${ARCH}) |
+OUTPUT_FORMAT(${OUTPUT_FORMAT}) |
+${RELOCATING+${LIB_SEARCH_DIRS}} |
+ENTRY(${ENTRY}) |
+ |
+PHDRS |
+{ |
+ headers PT_PHDR PHDRS ; |
+ text PT_LOAD FILEHDR PHDRS ; |
+ data PT_LOAD ; |
+ dynamic PT_DYNAMIC ; |
+} |
+ |
+SECTIONS |
+{ |
+ . = SIZEOF_HEADERS; |
+ /* ECO32 had an .interp (interrupt pointer) page stuffed in here */ |
+ . = ${TEXT_START_ADDR}; |
+ .text : { *(.text) } :text |
+ .rodata : { *(.rodata) } /* defaults to :text */ |
+ /* ECO32 moved to a new page in memory here*/ |
+ .data : { *(.data) } :data |
+ .dynamic : { *(.dynamic) } :data :dynamic |
+} |
+EOF |
diff -Naur binutils-2.25-original/ld/testsuite/lib/ld-lib.exp binutils-2.25/ld/testsuite/lib/ld-lib.exp |
--- binutils-2.25-original/ld/testsuite/lib/ld-lib.exp 2014-11-04 04:54:41.000000000 -0500 |
+++ binutils-2.25/ld/testsuite/lib/ld-lib.exp 2016-02-04 21:12:13.355418158 -0500 |
@@ -1646,6 +1646,7 @@ |
5882,7 → 4449,7
&& ![istarget *-*-irix*] |
&& ![istarget *-*-rtems] } { |
return 1 |
diff -Naur '--exclude=*.swp' binutils-2.25-original/makdump.txt binutils-2.25/makdump.txt |
diff -Naur binutils-2.25-original/makdump.txt binutils-2.25/makdump.txt |
--- binutils-2.25-original/makdump.txt 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/makdump.txt 2016-02-04 21:12:13.395417836 -0500 |
@@ -0,0 +1,144 @@ |
6030,7 → 4597,7
+make[1]: *** [configure-opcodes] Error 1 |
+make[1]: Leaving directory `/home/dan/work/rnd/zipcpu/sw/binutils-2.25' |
+make: *** [all] Error 2 |
diff -Naur '--exclude=*.swp' binutils-2.25-original/opcodes/configure binutils-2.25/opcodes/configure |
diff -Naur binutils-2.25-original/opcodes/configure binutils-2.25/opcodes/configure |
--- binutils-2.25-original/opcodes/configure 2014-12-23 09:22:07.000000000 -0500 |
+++ binutils-2.25/opcodes/configure 2016-02-04 21:12:15.387401820 -0500 |
@@ -12634,6 +12634,7 @@ |
6041,7 → 4608,7
|
"") ;; |
*) as_fn_error "*** unknown target architecture $arch" "$LINENO" 5 ;; |
diff -Naur '--exclude=*.swp' binutils-2.25-original/opcodes/configure.ac binutils-2.25/opcodes/configure.ac |
diff -Naur binutils-2.25-original/opcodes/configure.ac binutils-2.25/opcodes/configure.ac |
--- binutils-2.25-original/opcodes/configure.ac 2014-10-14 03:32:04.000000000 -0400 |
+++ binutils-2.25/opcodes/configure.ac 2016-02-04 21:12:15.391401789 -0500 |
@@ -351,6 +351,7 @@ |
6052,7 → 4619,7
|
"") ;; |
*) AC_MSG_ERROR(*** unknown target architecture $arch) ;; |
diff -Naur '--exclude=*.swp' binutils-2.25-original/opcodes/disassemble.c binutils-2.25/opcodes/disassemble.c |
diff -Naur binutils-2.25-original/opcodes/disassemble.c binutils-2.25/opcodes/disassemble.c |
--- binutils-2.25-original/opcodes/disassemble.c 2014-10-14 03:32:04.000000000 -0400 |
+++ binutils-2.25/opcodes/disassemble.c 2016-02-04 21:12:15.391401789 -0500 |
@@ -96,6 +96,7 @@ |
6075,7 → 4642,7
#ifdef ARCH_vax |
case bfd_arch_vax: |
disassemble = print_insn_vax; |
diff -Naur '--exclude=*.swp' binutils-2.25-original/opcodes/Makefile.am binutils-2.25/opcodes/Makefile.am |
diff -Naur binutils-2.25-original/opcodes/Makefile.am binutils-2.25/opcodes/Makefile.am |
--- binutils-2.25-original/opcodes/Makefile.am 2014-10-14 03:32:04.000000000 -0400 |
+++ binutils-2.25/opcodes/Makefile.am 2016-02-04 21:12:15.391401789 -0500 |
@@ -265,7 +265,8 @@ |
6098,7 → 4665,7
sh-dis.lo: sh-dis.c |
if am__fastdepCC |
$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ @archdefs@ $(srcdir)/sh-dis.c |
diff -Naur '--exclude=*.swp' binutils-2.25-original/opcodes/Makefile.in binutils-2.25/opcodes/Makefile.in |
diff -Naur binutils-2.25-original/opcodes/Makefile.in binutils-2.25/opcodes/Makefile.in |
--- binutils-2.25-original/opcodes/Makefile.in 2014-10-14 03:32:04.000000000 -0400 |
+++ binutils-2.25/opcodes/Makefile.in 2016-02-04 21:12:15.391401789 -0500 |
@@ -358,7 +358,8 @@ |
6141,10 → 4708,10
sh-dis.lo: sh-dis.c |
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ @archdefs@ $(srcdir)/sh-dis.c |
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo |
diff -Naur '--exclude=*.swp' binutils-2.25-original/opcodes/zip-dis.c binutils-2.25/opcodes/zip-dis.c |
diff -Naur binutils-2.25-original/opcodes/zip-dis.c binutils-2.25/opcodes/zip-dis.c |
--- binutils-2.25-original/opcodes/zip-dis.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/opcodes/zip-dis.c 2016-03-01 17:47:01.691255025 -0500 |
@@ -0,0 +1,231 @@ |
+++ binutils-2.25/opcodes/zip-dis.c 2016-02-04 21:33:04.569521977 -0500 |
@@ -0,0 +1,206 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
+// Filename: zip-dis.c |
6218,7 → 4785,7
+} |
+ |
+static void |
+zipi_to_halfstring(const unsigned addr, const ZIPI ins, char *line, const ZOPCODE *listp) |
+zipi_to_halfstring(const ZIPI ins, char *line, const ZOPCODE *listp) |
+{ |
+ int i; |
+ for(i=0; i<nzip_oplist; i++) { |
6264,20 → 4831,7
+ sprintf(&line[strlen(line)], |
+ "(%s)", zip_regstr[rb]); |
+ } |
+ // Treat relative jumps (branches) specially as well |
+ } else if ((toupper(listp[i].s_opstr[0]=='B')) |
+ &&(toupper(listp[i].s_opstr[2])!='S') |
+ &&(toupper(listp[i].s_opstr[2])!='E') |
+ &&(toupper(listp[i].s_opstr[2])!='K') |
+ &&(addr != 0)) { |
+ // Branch instruction: starts with B and isn't |
+ // BREV (bit reverse), BRK (break), or |
+ // BUSY |
+ unsigned target = addr; |
+ int imv = 0; |
+ |
+ target += zip_getbits(ins, listp[i].s_i)+1; |
+ sprintf(&line[strlen(line)], "@0x%08x", target); |
+ } else { |
+ int memop = (strncasecmp("LOD", |
+ listp[i].s_opstr, 3)==0) ? 1:0; |
6317,11 → 4871,11
+} |
+ |
+static void |
+zipi_to_double_string(const unsigned addr, const ZIPI ins, char *la, char *lb) { |
+ zipi_to_halfstring(addr, ins, la, zip_oplist); |
+zipi_to_double_string(const ZIPI ins, char *la, char *lb) { |
+ zipi_to_halfstring(ins, la, zip_oplist); |
+ if (lb) { |
+ if (ins & 0x80000000) { |
+ zipi_to_halfstring(addr, ins, lb, zip_opbottomlist); |
+ zipi_to_halfstring(ins, lb, zip_opbottomlist); |
+ } else lb[0] = '\0'; |
+ } |
+} |
6335,7 → 4889,7
+ |
+ (*info->read_memory_func)(vma, ibytes, 4, info); |
+ iword = (ibytes[0]<<24)|(ibytes[1]<<16)|(ibytes[2]<<8)|(ibytes[3]); |
+ zipi_to_double_string(vma, iword, astr, bstr); |
+ zipi_to_double_string(iword, astr, bstr); |
+ |
+/* |
+ if (vma&2) { |
6354,29 → 4908,17
+ (*info->fprintf_func)(info->stream, "%-20s | %-20s", astr, bstr); |
+ else |
+ (*info->fprintf_func)(info->stream, "%s", astr); |
+ |
+ // Normal LOD (PC),PC = 0x7c87c000 |
+ // 1'b0, 4'hf, 5'h12, 3'h0, 1'b1, 4'hf, 14'h00 |
+ // 0111 1100 1000 0111 1100 0000 0000 0000 |
+ // or VLIW x | LOD (PC),PC |
+ // 1'b1, 4'hx 5'hx 1'b0 2'bx 5'hx 4'hf 5'h12 1'b1 4'hf |
+ // 1xxx xxxx xx0x xxxx xx11 1110 0101 1111 |
+ // 0x80203fff mask, val = 0x80003e5f |
+ if ((iword == 0x7c87c000)||((iword&0x80203fff)==0x80003e5f)) |
+ return 8; |
+ if ((iword&0xffc7ffff)==0x7c87c001) // Conditional long jump |
+ return 12; |
+ return 4; |
+} |
+ |
+ |
+disassembler_ftype |
+zip_get_disassembler(bfd *abfd ATTRIBUTE_UNUSED) |
+zip_get_disassembler(bfd *abfd) |
+{ |
+ return print_zip_insn; |
+} |
+ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/opcodes/zip-dis.h binutils-2.25/opcodes/zip-dis.h |
diff -Naur binutils-2.25-original/opcodes/zip-dis.h binutils-2.25/opcodes/zip-dis.h |
--- binutils-2.25-original/opcodes/zip-dis.h 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/opcodes/zip-dis.h 2016-02-04 21:33:12.945457256 -0500 |
@@ -0,0 +1,45 @@ |
6425,10 → 4967,10
+zip_get_disassembler(bfd *abfd); |
+ |
+#endif |
diff -Naur '--exclude=*.swp' binutils-2.25-original/opcodes/zip-opc.c binutils-2.25/opcodes/zip-opc.c |
diff -Naur binutils-2.25-original/opcodes/zip-opc.c binutils-2.25/opcodes/zip-opc.c |
--- binutils-2.25-original/opcodes/zip-opc.c 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/opcodes/zip-opc.c 2016-03-01 12:06:43.266929923 -0500 |
@@ -0,0 +1,501 @@ |
+++ binutils-2.25/opcodes/zip-opc.c 2016-02-04 21:33:19.777404475 -0500 |
@@ -0,0 +1,500 @@ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
+// Filename: zip-opc.c |
6522,7 → 5064,7
+ // CLR -- a LDI of zero |
+ // 0.rrrr.1011.iiiiiii-- |
+ // 0rrr r101 1... |
+ { "CLR", 0x87ffffff, 0x05800000, ZIP_REGFIELD(27),ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED }, |
+ { "CLR", 0x878fffff, 0x05800000, ZIP_REGFIELD(27),ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED }, |
+ // HALT |
+ // 0.1110.00011.ccc.0.0000000000010 |
+ // 0111.0000.11cc.c000.0000.0000.0000.0010 |
6545,8 → 5087,7
+ { "JMP", 0xff800000, 0x7d800000, ZIP_REGFIELD(27),ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(23,0), ZIP_OPUNUSED }, |
+ // 0.1111.10010.000.1.1111.000000000000000 |
+ // 0111.1100.10cc.c111.11ii.iiii.iiii.iiii LOD (PC),PC |
+ { "LJMP", 0xffffffff, 0x7c87c000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED }, |
+ { "LJMP", 0xffc7ffff, 0x7c87c001, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_BITFIELD(3,19) }, // Conditional long jump, LOD.X 1(PC),PC |
+ { "LJMP", 0xffc7ffff, 0x7c87c000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_BITFIELD(3,19) }, |
+ // NOT : XOR w/ -1 |
+ // 0.rrrr.00100.ccc.0111.11111111111 |
+ // 0rrr.r001.00cc.c011.f.f.f.f |
6655,7 → 5196,7
+ { "BRZ", 0xffd40000, 0xf8900000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(4,14), ZIP_OPUNUSED }, |
+ { "BNZ", 0xffd40000, 0xf8940000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(4,14), ZIP_OPUNUSED }, |
+ // LDI 1.rrrr.1011x.ccc.iiiii -> 1rrr r101 1xcc ciii ii |
+ { "CLR", 0x8787c000, 0x85800000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_BITFIELD(2,19) }, |
+ { "CLR", 0x87c7c000, 0x85800000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_BITFIELD(2,19) }, |
+ // JMP 1.1111.01111.ccc.1rrrr -> 1111 1011 11cc c1rr rr (Mov to PC) |
+ { "JMP", 0xffc40000, 0xfbc40000, ZIP_REGFIELD(27),ZIP_OPUNUSED, ZIP_REGFIELD(14), ZIP_OPUNUSED, ZIP_BITFIELD(2,19) }, |
+ // XOR 1.rrrr.00100.ccc.01111 -> 1rrr r001 00cc c011 11 |
6722,7 → 5263,7
+ { "DIVS", 0x87c40000, 0x85400000, ZIP_REGFIELD(27), ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_IMMFIELD(4,14), ZIP_BITFIELD(2,19) }, |
+ { "DIVS", 0x87c40000, 0x85440000, ZIP_REGFIELD(27), ZIP_REGFIELD(27), ZIP_REGFIELD(14), ZIP_OPUNUSED, ZIP_BITFIELD(2,19) }, |
+ // |
+ { "CLR", 0x8787c000, 0x85800000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_BITFIELD(2,19) }, |
+ { "CLR", 0x87c7c000, 0x85800000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_BITFIELD(2,19) }, |
+ { "LDI", 0x87c00000, 0x85800000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(5,14), ZIP_BITFIELD(2,19) }, |
+ // |
+ { "NOOP", 0xf7c00000, 0xf6000000, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED }, |
6767,7 → 5308,6
+ { "BRZ", 0x80383ff0, 0x80303c40, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(4,0), ZIP_OPUNUSED }, |
+ { "BNZ", 0x80383ff0, 0x80383c40, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_IMMFIELD(4,0), ZIP_OPUNUSED }, |
+ // |
+ { "LJMP", 0x80203fff, 0x80003e5f, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED }, |
+ // |
+ // CLRF ... an XOR w/ self instruction |
+ // 0.rrrr.00100.ccc.1.rrrr.iiiii--- |
6775,6 → 5315,7
+ // "CLRF", 0xffc7cfff, 0x7907c000, ZIP_REGFIELD(27), ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_BITFIELD(3,19), |
+ // CLR -- a LDI of zero |
+ // LDI 1xxx.xxxx.xxxx.xxxx.xxrr.rroo.ooo.iiiii -> 1rrr r100 1xcc ciii ii |
+ { "CLR", 0x800003ff, 0x80000000, ZIP_REGFIELD(10),ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED, ZIP_OPUNUSED }, |
+ // JMP 1xxx -- xx11.1101.1111.rrrr (Mov to PC) |
+ { "JMP", 0x80203ff0, 0x80003df0, ZIP_REGFIELD(10),ZIP_OPUNUSED, ZIP_REGFIELD(0), ZIP_OPUNUSED, ZIP_OPUNUSED }, |
+ // Conditional jump, still move to PC at issue |
6930,7 → 5471,7
+const int nzip_oplist = (sizeof(zip_oplist_raw)/sizeof(ZOPCODE)); |
+const int nzip_opbottom = (sizeof(zip_opbottomlist_raw)/sizeof(ZOPCODE)); |
+ |
diff -Naur '--exclude=*.swp' binutils-2.25-original/opcodes/zip-opc.h binutils-2.25/opcodes/zip-opc.h |
diff -Naur binutils-2.25-original/opcodes/zip-opc.h binutils-2.25/opcodes/zip-opc.h |
--- binutils-2.25-original/opcodes/zip-opc.h 1969-12-31 19:00:00.000000000 -0500 |
+++ binutils-2.25/opcodes/zip-opc.h 2016-02-04 21:33:27.161347438 -0500 |
@@ -0,0 +1,66 @@ |