source:
clfs-embedded/patches/binutils-2.19-branch_update-4.patch@
c1f3dad
Last change on this file since c1f3dad was 06beb7a, checked in by , 16 years ago | |
---|---|
|
|
File size: 116.9 KB |
-
bfd/ChangeLog
Submitted By: Jim Gifford (jim at cross-lfs dot org) Date: 01-22-2009 Initial Package Version: 2.19 Origin: Upstream Upstream Status: Applied Description: This is a branch update for binutils-2.19, and should be rechecked periodically. diff -Naur binutils-2.19.orig/bfd/ChangeLog binutils-2.19/bfd/ChangeLog
old new 1 2009-01-14 Joseph Myers <joseph@codesourcery.com> 2 3 * elf32-arm.c (elf32_arm_final_link_relocate): Do not turn 4 branches to undefine weak symbols into branches to the next 5 instruction if creating PLT entries for those symbols. 6 7 2008-12-23 Nick Clifton <nickc@redhat.com> 8 9 * Import this patch from the mainline: 10 2008-11-10 Andreas Schwab <schwab@suse.de> 11 12 PR 7011 13 * elf.c (assign_file_positions_for_non_load_sections): Handle 14 PT_GNU_RELRO specially. 15 16 2008-11-20 Alan Modra <amodra@bigpond.net.au> 17 18 * elf32-ppc.c (allocate_dynrelocs): Always use tlsld_got for 19 TLS_LD even when symbol is used with other TLS reloc types. 20 (ppc_elf_relocate_section): Bypass symbol checks when using tlsld_got. 21 Leave addend zero on LD DTPMOD dynamic reloc. 22 23 2008-11-17 Eric B. Weddington <eric.weddington@atmel.com> 24 25 PR 7022 26 * elf32-avr.c (bfd_elf_avr_final_write_processing): 27 Add missing break statements. 28 29 2008-10-28 Tristan Gingold <gingold@adacore.com> 30 31 * configure.in: Bump version to 2.19.0 32 * Makefile.am (RELEASE): Unset. 33 * configure, Makefile.in: Regenerated. 34 1 35 2008-10-16 Tristan Gingold <gingold@adacore.com> 2 36 3 37 * configure.in: Bump version to 2.19 -
bfd/configure
diff -Naur binutils-2.19.orig/bfd/configure binutils-2.19/bfd/configure
old new 3032 3032 3033 3033 # Define the identity of the package. 3034 3034 PACKAGE=bfd 3035 VERSION=2.19 3035 VERSION=2.19.0 3036 3036 3037 3037 3038 3038 cat >>confdefs.h <<_ACEOF -
bfd/configure.in
diff -Naur binutils-2.19.orig/bfd/configure.in binutils-2.19/bfd/configure.in
old new 8 8 AC_CANONICAL_TARGET 9 9 AC_ISC_POSIX 10 10 11 AM_INIT_AUTOMAKE(bfd, 2.19 )11 AM_INIT_AUTOMAKE(bfd, 2.19.0) 12 12 13 13 dnl These must be called before LT_INIT, because it may want 14 14 dnl to call AC_CHECK_PROG. -
bfd/doc/bfdver.texi
diff -Naur binutils-2.19.orig/bfd/doc/bfdver.texi binutils-2.19/bfd/doc/bfdver.texi
old new 1 @set VERSION 2.19 1 @set VERSION 2.19.0 2 2 @set VERSION_PACKAGE (GNU Binutils) 3 @set UPDATED October 20083 @set UPDATED December 2008 4 4 @set BUGURL @uref{http://www.sourceware.org/bugzilla/} -
bfd/elf32-arm.c
diff -Naur binutils-2.19.orig/bfd/elf32-arm.c binutils-2.19/bfd/elf32-arm.c
old new 6381 6381 int thumb2 = using_thumb2 (globals); 6382 6382 6383 6383 /* A branch to an undefined weak symbol is turned into a jump to 6384 the next instruction. */ 6385 if (h && h->root.type == bfd_link_hash_undefweak) 6384 the next instruction unless a PLT entry will be created. */ 6385 if (h && h->root.type == bfd_link_hash_undefweak 6386 && !(splt != NULL && h->plt.offset != (bfd_vma) -1)) 6386 6387 { 6387 6388 bfd_put_16 (input_bfd, 0xe000, hit_data); 6388 6389 bfd_put_16 (input_bfd, 0xbf00, hit_data + 2); -
bfd/elf32-avr.c
diff -Naur binutils-2.19.orig/bfd/elf32-avr.c binutils-2.19/bfd/elf32-avr.c
old new 1298 1298 1299 1299 case bfd_mach_avr25: 1300 1300 val = E_AVR_MACH_AVR25; 1301 break; 1301 1302 1302 1303 case bfd_mach_avr3: 1303 1304 val = E_AVR_MACH_AVR3; … … 1305 1306 1306 1307 case bfd_mach_avr31: 1307 1308 val = E_AVR_MACH_AVR31; 1309 break; 1308 1310 1309 1311 case bfd_mach_avr35: 1310 1312 val = E_AVR_MACH_AVR35; 1313 break; 1311 1314 1312 1315 case bfd_mach_avr4: 1313 1316 val = E_AVR_MACH_AVR4; -
bfd/elf32-ppc.c
diff -Naur binutils-2.19.orig/bfd/elf32-ppc.c binutils-2.19/bfd/elf32-ppc.c
old new 4997 4997 eh = (struct ppc_elf_link_hash_entry *) h; 4998 4998 if (eh->elf.got.refcount > 0) 4999 4999 { 5000 bfd_boolean dyn; 5001 unsigned int need; 5002 5000 5003 /* Make sure this symbol is output as a dynamic symbol. */ 5001 5004 if (eh->elf.dynindx == -1 5002 5005 && !eh->elf.forced_local … … 5006 5009 return FALSE; 5007 5010 } 5008 5011 5009 if (eh->tls_mask == (TLS_TLS | TLS_LD) 5010 && !eh->elf.def_dynamic) 5011 { 5012 /* If just an LD reloc, we'll just use htab->tlsld_got.offset. */ 5013 htab->tlsld_got.refcount += 1; 5014 eh->elf.got.offset = (bfd_vma) -1; 5015 } 5016 else 5012 need = 0; 5013 if ((eh->tls_mask & TLS_TLS) != 0) 5017 5014 { 5018 bfd_boolean dyn; 5019 unsigned int need = 0; 5020 if ((eh->tls_mask & TLS_TLS) != 0) 5015 if ((eh->tls_mask & TLS_LD) != 0) 5021 5016 { 5022 if ((eh->tls_mask & TLS_LD) != 0) 5023 need += 8; 5024 if ((eh->tls_mask & TLS_GD) != 0) 5017 if (!eh->elf.def_dynamic) 5018 /* We'll just use htab->tlsld_got.offset. This should 5019 always be the case. It's a little odd if we have 5020 a local dynamic reloc against a non-local symbol. */ 5021 htab->tlsld_got.refcount += 1; 5022 else 5025 5023 need += 8; 5026 if ((eh->tls_mask & (TLS_TPREL | TLS_TPRELGD)) != 0)5027 need += 4;5028 if ((eh->tls_mask & TLS_DTPREL) != 0)5029 need += 4;5030 5024 } 5031 else 5025 if ((eh->tls_mask & TLS_GD) != 0) 5026 need += 8; 5027 if ((eh->tls_mask & (TLS_TPREL | TLS_TPRELGD)) != 0) 5028 need += 4; 5029 if ((eh->tls_mask & TLS_DTPREL) != 0) 5032 5030 need += 4; 5031 } 5032 else 5033 need += 4; 5034 if (need == 0) 5035 eh->elf.got.offset = (bfd_vma) -1; 5036 else 5037 { 5033 5038 eh->elf.got.offset = allocate_got (htab, need); 5034 5039 dyn = htab->elf.dynamic_sections_created; 5035 5040 if ((info->shared … … 5039 5044 { 5040 5045 /* All the entries we allocated need relocs. 5041 5046 Except LD only needs one. */ 5042 if ((eh->tls_mask & TLS_LD) != 0) 5047 if ((eh->tls_mask & TLS_LD) != 0 5048 && eh->elf.def_dynamic) 5043 5049 need -= 4; 5044 5050 htab->relgot->size += need * (sizeof (Elf32_External_Rela) / 4); 5045 5051 } … … 5275 5281 for (; local_got < end_local_got; ++local_got, ++lgot_masks) 5276 5282 if (*local_got > 0) 5277 5283 { 5278 if (*lgot_masks == (TLS_TLS | TLS_LD)) 5284 unsigned int need = 0; 5285 if ((*lgot_masks & TLS_TLS) != 0) 5279 5286 { 5280 /* If just an LD reloc, we'll just use 5281 htab->tlsld_got.offset. */ 5282 htab->tlsld_got.refcount += 1; 5283 *local_got = (bfd_vma) -1; 5287 if ((*lgot_masks & TLS_GD) != 0) 5288 need += 8; 5289 if ((*lgot_masks & TLS_LD) != 0) 5290 htab->tlsld_got.refcount += 1; 5291 if ((*lgot_masks & (TLS_TPREL | TLS_TPRELGD)) != 0) 5292 need += 4; 5293 if ((*lgot_masks & TLS_DTPREL) != 0) 5294 need += 4; 5284 5295 } 5285 5296 else 5297 need += 4; 5298 if (need == 0) 5299 *local_got = (bfd_vma) -1; 5300 else 5286 5301 { 5287 unsigned int need = 0;5288 if ((*lgot_masks & TLS_TLS) != 0)5289 {5290 if ((*lgot_masks & TLS_GD) != 0)5291 need += 8;5292 if ((*lgot_masks & (TLS_TPREL | TLS_TPRELGD)) != 0)5293 need += 4;5294 if ((*lgot_masks & TLS_DTPREL) != 0)5295 need += 4;5296 }5297 else5298 need += 4;5299 5302 *local_got = allocate_got (htab, need); 5300 5303 if (info->shared) 5301 5304 htab->relgot->size += (need … … 6560 6563 6561 6564 /* Generate relocs for the dynamic linker. */ 6562 6565 if ((info->shared || indx != 0) 6563 && (h == NULL 6566 && (offp == &htab->tlsld_got.offset 6567 || h == NULL 6564 6568 || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT 6565 6569 || h->root.type != bfd_link_hash_undefweak)) 6566 6570 { … … 6591 6595 outrel.r_info = ELF32_R_INFO (indx, R_PPC_RELATIVE); 6592 6596 else 6593 6597 outrel.r_info = ELF32_R_INFO (indx, R_PPC_GLOB_DAT); 6594 if (indx == 0 )6598 if (indx == 0 && tls_ty != (TLS_TLS | TLS_LD)) 6595 6599 { 6596 6600 outrel.r_addend += relocation; 6597 6601 if (tls_ty & (TLS_GD | TLS_DTPREL | TLS_TPREL)) -
binutils-2.19
diff -Naur binutils-2.19.orig/bfd/elf.c binutils-2.19/bfd/elf.c
old new 4606 4606 m != NULL; 4607 4607 m = m->next, p++) 4608 4608 { 4609 if (m->count != 0) 4609 if (p->p_type == PT_GNU_RELRO) 4610 { 4611 const Elf_Internal_Phdr *lp; 4612 4613 BFD_ASSERT (!m->includes_filehdr && !m->includes_phdrs); 4614 4615 if (link_info != NULL) 4616 { 4617 /* During linking the range of the RELRO segment is passed 4618 in link_info. */ 4619 for (lp = phdrs; lp < phdrs + count; ++lp) 4620 { 4621 if (lp->p_type == PT_LOAD 4622 && lp->p_vaddr >= link_info->relro_start 4623 && lp->p_vaddr < link_info->relro_end 4624 && lp->p_vaddr + lp->p_filesz >= link_info->relro_end) 4625 break; 4626 } 4627 } 4628 else 4629 { 4630 /* Otherwise we are copying an executable or shared 4631 library, but we need to use the same linker logic. */ 4632 for (lp = phdrs; lp < phdrs + count; ++lp) 4633 { 4634 if (lp->p_type == PT_LOAD 4635 && lp->p_paddr == p->p_paddr) 4636 break; 4637 } 4638 } 4639 4640 if (lp < phdrs + count) 4641 { 4642 p->p_vaddr = lp->p_vaddr; 4643 p->p_paddr = lp->p_paddr; 4644 p->p_offset = lp->p_offset; 4645 if (link_info != NULL) 4646 p->p_filesz = link_info->relro_end - lp->p_vaddr; 4647 else if (m->p_size_valid) 4648 p->p_filesz = m->p_size; 4649 else 4650 abort (); 4651 p->p_memsz = p->p_filesz; 4652 p->p_align = 1; 4653 p->p_flags = (lp->p_flags & ~PF_W); 4654 } 4655 else if (link_info != NULL) 4656 { 4657 memset (p, 0, sizeof *p); 4658 p->p_type = PT_NULL; 4659 } 4660 else 4661 abort (); 4662 } 4663 else if (m->count != 0) 4610 4664 { 4611 4665 if (p->p_type != PT_LOAD 4612 4666 && (p->p_type != PT_NOTE … … 4622 4676 p->p_filesz = sect->filepos - m->sections[0]->filepos; 4623 4677 if (hdr->sh_type != SHT_NOBITS) 4624 4678 p->p_filesz += hdr->sh_size; 4625 4626 if (p->p_type == PT_GNU_RELRO) 4627 { 4628 /* When we get here, we are copying executable 4629 or shared library. But we need to use the same 4630 linker logic. */ 4631 Elf_Internal_Phdr *lp; 4632 4633 for (lp = phdrs; lp < phdrs + count; ++lp) 4634 { 4635 if (lp->p_type == PT_LOAD 4636 && lp->p_paddr == p->p_paddr) 4637 break; 4638 } 4639 4640 if (lp < phdrs + count) 4641 { 4642 /* We should use p_size if it is valid since it 4643 may contain the first few bytes of the next 4644 SEC_ALLOC section. */ 4645 if (m->p_size_valid) 4646 p->p_filesz = m->p_size; 4647 else 4648 abort (); 4649 p->p_vaddr = lp->p_vaddr; 4650 p->p_offset = lp->p_offset; 4651 p->p_memsz = p->p_filesz; 4652 p->p_align = 1; 4653 } 4654 else 4655 abort (); 4656 } 4657 else 4658 p->p_offset = m->sections[0]->filepos; 4679 p->p_offset = m->sections[0]->filepos; 4659 4680 } 4660 4681 } 4661 else 4682 else if (m->includes_filehdr) 4662 4683 { 4663 if (m->includes_filehdr) 4664 { 4665 p->p_vaddr = filehdr_vaddr; 4666 if (! m->p_paddr_valid) 4667 p->p_paddr = filehdr_paddr; 4668 } 4669 else if (m->includes_phdrs) 4670 { 4671 p->p_vaddr = phdrs_vaddr; 4672 if (! m->p_paddr_valid) 4673 p->p_paddr = phdrs_paddr; 4674 } 4675 else if (p->p_type == PT_GNU_RELRO) 4676 { 4677 Elf_Internal_Phdr *lp; 4678 4679 for (lp = phdrs; lp < phdrs + count; ++lp) 4680 { 4681 if (lp->p_type == PT_LOAD 4682 && lp->p_vaddr <= link_info->relro_end 4683 && lp->p_vaddr >= link_info->relro_start 4684 && (lp->p_vaddr + lp->p_filesz 4685 >= link_info->relro_end)) 4686 break; 4687 } 4688 4689 if (lp < phdrs + count 4690 && link_info->relro_end > lp->p_vaddr) 4691 { 4692 p->p_vaddr = lp->p_vaddr; 4693 p->p_paddr = lp->p_paddr; 4694 p->p_offset = lp->p_offset; 4695 p->p_filesz = link_info->relro_end - lp->p_vaddr; 4696 p->p_memsz = p->p_filesz; 4697 p->p_align = 1; 4698 p->p_flags = (lp->p_flags & ~PF_W); 4699 } 4700 else 4701 { 4702 memset (p, 0, sizeof *p); 4703 p->p_type = PT_NULL; 4704 } 4705 } 4684 p->p_vaddr = filehdr_vaddr; 4685 if (! m->p_paddr_valid) 4686 p->p_paddr = filehdr_paddr; 4687 } 4688 else if (m->includes_phdrs) 4689 { 4690 p->p_vaddr = phdrs_vaddr; 4691 if (! m->p_paddr_valid) 4692 p->p_paddr = phdrs_paddr; 4706 4693 } 4707 4694 } 4708 4695 -
bfd/Makefile.in
diff -Naur binutils-2.19.orig/bfd/Makefile.in binutils-2.19/bfd/Makefile.in
old new 271 271 ACLOCAL_AMFLAGS = -I . -I .. -I ../config 272 272 273 273 # Uncomment the following line when doing a release. 274 RELEASE =y274 RELEASE=y 275 275 INCDIR = $(srcdir)/../include 276 276 CSEARCH = -I. -I$(srcdir) -I$(INCDIR) 277 277 MKDEP = gcc -MM -
bfd/version.h
diff -Naur binutils-2.19.orig/bfd/version.h binutils-2.19/bfd/version.h
old new 1 #define BFD_VERSION_DATE 200 810161 #define BFD_VERSION_DATE 20090123 2 2 #define BFD_VERSION @bfd_version@ 3 3 #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ 4 4 #define REPORT_BUGS_TO @report_bugs_to@ -
binutils/ChangeLog
diff -Naur binutils-2.19.orig/binutils/ChangeLog binutils-2.19/binutils/ChangeLog
old new 1 2008-12-23 Nick Clifton <nickc@redhat.com> 2 3 * windmc.c (main): Use correct type for file length. 4 * dlltool.c (gen_exp_file): Likewise. 5 6 2008-12-01 Nick Clifton <nickc@redhat.com> 7 8 PR 7044 9 * dlltool.c (run): Use formatting string to avoid compile time 10 warning. 11 (gen_exp_file): Check return value from fread. 12 * windmc.c (main): Check return value from fread. 13 1 14 2008-09-25 Richard Henderson <rth@redhat.com> 2 15 3 16 * dwarf.c (size_of_encoded_value, get_encoded_value): Move up. -
binutils/dlltool.c
diff -Naur binutils-2.19.orig/binutils/dlltool.c binutils-2.19/binutils/dlltool.c
old new 1206 1206 1207 1207 if (pid == -1) 1208 1208 { 1209 inform ( strerror (errno));1209 inform ("%s", strerror (errno)); 1210 1210 1211 1211 fatal (errmsg_fmt, errmsg_arg); 1212 1212 } … … 1980 1980 int addr; 1981 1981 long need[PAGE_SIZE]; 1982 1982 long page_addr; 1983 intnumbytes;1983 bfd_size_type numbytes; 1984 1984 int num_entries; 1985 1985 long *copy; 1986 1986 int j; … … 1992 1992 numbytes = ftell (base_file); 1993 1993 fseek (base_file, 0, SEEK_SET); 1994 1994 copy = xmalloc (numbytes); 1995 fread (copy, 1, numbytes, base_file); 1995 if (fread (copy, 1, numbytes, base_file) < numbytes) 1996 fatal (_("failed to read the number of entries from base file")); 1996 1997 num_entries = numbytes / sizeof (long); 1997 1998 1998 1999 1999 fprintf (f, "\t.section\t.reloc\n"); 2000 2000 if (num_entries) 2001 2001 { -
binutils/windmc.c
diff -Naur binutils-2.19.orig/binutils/windmc.c binutils-2.19/binutils/windmc.c
old new 1144 1144 unichar *u; 1145 1145 rc_uint_type ul; 1146 1146 char *buff; 1147 longflen;1147 bfd_size_type flen; 1148 1148 FILE *fp = fopen (input_filename, "rb"); 1149 1149 1150 1150 if (!fp) … … 1155 1155 fseek (fp, 0, SEEK_SET); 1156 1156 buff = malloc (flen + 3); 1157 1157 memset (buff, 0, flen + 3); 1158 fread (buff, 1, flen, fp); 1158 if (fread (buff, 1, flen, fp) < flen) 1159 fatal (_("unable to read contents of %s"), input_filename); 1159 1160 fclose (fp); 1160 1161 if (mcset_text_in_is_unicode != 1) 1161 1162 { -
configure.ac
diff -Naur binutils-2.19.orig/configure.ac binutils-2.19/configure.ac
old new 166 166 # binutils, gas and ld appear in that order because it makes sense to run 167 167 # "make check" in that particular order. 168 168 # If --enable-gold is used, "gold" will replace "ld". 169 host_tools=" byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"169 host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools" 170 170 171 171 # libgcj represents the runtime libraries only used by gcj. 172 172 libgcj="target-libffi \ -
gas/ChangeLog
diff -Naur binutils-2.19.orig/gas/ChangeLog binutils-2.19/gas/ChangeLog
old new 1 2009-01-14 Jakub Jelinek <jakub@redhat.com> 2 3 * Makefile.am (ehopt.o): Add struc-symbol.h. 4 * Makefile.in: Regenerated. 5 * ehopt.c: Include struc-symbol.h. 6 (check_eh_frame): For very small O_constant DW_CFA_advance_loc4 7 create correct DW_CFA_advance_loc. Handle O_subtract only 8 for code alignment factor 1, otherwise handle O_divide or 9 O_right_shift of O_subtract and O_constant. 10 (eh_frame_estimate_size_before_relax): Always divide by ca. 11 (eh_frame_convert_frag): Likewise. 12 13 2009-01-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> 14 15 * dw2gencfi.c (output_cfi_insn): Scale DW_CFA_advance_loc1, 16 DW_CFA_advance_loc2 and DW_CFA_advance_loc4 outputs. 17 18 2009-01-08 Adam Nemet <anemet@caviumnetworks.com> 19 20 * config/tc-mips.c (NO_ISA_COP): New macro. 21 (COP_INSN): New macro. 22 (is_opcode_valid): Use them. 23 (macro) <ld_st>: Use them. Don't accept coprocessor load store 24 insns based on the ISA if CPU is NO_ISA_COP. 25 <copz>: Likewise for coprocessor operations. 26 1 27 2008-10-09 Eric Botcazou <ebotcazou@adacore.com> 2 28 3 29 * dw2gencfi.c (cfi_finish): Deal with md_fix_up_eh_frame. -
gas/config/tc-mips.c
diff -Naur binutils-2.19.orig/gas/config/tc-mips.c binutils-2.19/gas/config/tc-mips.c
old new 514 514 /* Returns true for a (non floating-point) coprocessor instruction. Reading 515 515 or writing the condition code is only possible on the coprocessors and 516 516 these insns are not marked with INSN_COP. Thus for these insns use the 517 condition-code flags unless this is the floating-point coprocessor. */517 condition-code flags. */ 518 518 #define COP_INSN(PINFO) \ 519 519 (PINFO != INSN_MACRO \ 520 && (((PINFO) & INSN_COP) \ 521 || ((PINFO) & (INSN_READ_COND_CODE | INSN_WRITE_COND_CODE) \ 522 && ((PINFO) & (FP_S | FP_D)) == 0))) 520 && ((PINFO) & (FP_S | FP_D)) == 0 \ 521 && ((PINFO) & (INSN_COP | INSN_READ_COND_CODE | INSN_WRITE_COND_CODE))) 523 522 524 523 /* MIPS PIC level. */ 525 524 -
gas/dw2gencfi.c
diff -Naur binutils-2.19.orig/gas/dw2gencfi.c binutils-2.19/gas/dw2gencfi.c
old new 1 1 /* dw2gencfi.c - Support for generating Dwarf2 CFI information. 2 Copyright 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.2 Copyright 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 3 3 Contributed by Michal Ludvig <mludvig@suse.cz> 4 4 5 5 This file is part of GAS, the GNU Assembler. … … 972 972 973 973 if (scaled <= 0x3F) 974 974 out_one (DW_CFA_advance_loc + scaled); 975 else if ( delta<= 0xFF)975 else if (scaled <= 0xFF) 976 976 { 977 977 out_one (DW_CFA_advance_loc1); 978 out_one ( delta);978 out_one (scaled); 979 979 } 980 else if ( delta<= 0xFFFF)980 else if (scaled <= 0xFFFF) 981 981 { 982 982 out_one (DW_CFA_advance_loc2); 983 out_two ( delta);983 out_two (scaled); 984 984 } 985 985 else 986 986 { 987 987 out_one (DW_CFA_advance_loc4); 988 out_four ( delta);988 out_four (scaled); 989 989 } 990 990 } 991 991 else -
binutils-2.19
diff -Naur binutils-2.19.orig/gas/ehopt.c binutils-2.19/gas/ehopt.c
old new 1 1 /* ehopt.c--optimize gcc exception frame information. 2 Copyright 1998, 2000, 2001, 2003, 2005, 2007 Free Software Foundation, Inc. 2 Copyright 1998, 2000, 2001, 2003, 2005, 2007, 2008 3 Free Software Foundation, Inc. 3 4 Written by Ian Lance Taylor <ian@cygnus.com>. 4 5 5 6 This file is part of GAS, the GNU Assembler. … … 21 22 22 23 #include "as.h" 23 24 #include "subsegs.h" 25 #include "struc-symbol.h" 24 26 25 27 /* We include this ELF file, even though we may not be assembling for 26 28 ELF, since the exception frame information is always in a format … … 398 400 subtracted were in the same frag and the expression was 399 401 reduced to a constant. We can do the optimization entirely 400 402 in this function. */ 401 if (d->cie_info.code_alignment > 0 402 && exp->X_add_number % d->cie_info.code_alignment == 0 403 && exp->X_add_number / d->cie_info.code_alignment < 0x40) 403 if (exp->X_add_number < 0x40) 404 404 { 405 405 d->loc4_frag->fr_literal[d->loc4_fix] 406 = DW_CFA_advance_loc 407 | (exp->X_add_number / d->cie_info.code_alignment); 406 = DW_CFA_advance_loc | exp->X_add_number; 408 407 /* No more bytes needed. */ 409 408 return 1; 410 409 } … … 419 418 *pnbytes = 2; 420 419 } 421 420 } 422 else if (exp->X_op == O_subtract )421 else if (exp->X_op == O_subtract && d->cie_info.code_alignment == 1) 423 422 { 424 423 /* This is a case we can optimize. The expression was not 425 424 reduced, so we can not finish the optimization until the end 426 425 of the assembly. We set up a variant frag which we handle 427 426 later. */ 428 int fr_subtype; 429 430 if (d->cie_info.code_alignment > 0) 431 fr_subtype = d->cie_info.code_alignment << 3; 432 else 433 fr_subtype = 0; 434 435 frag_var (rs_cfa, 4, 0, fr_subtype, make_expr_symbol (exp), 427 frag_var (rs_cfa, 4, 0, 1 << 3, make_expr_symbol (exp), 436 428 d->loc4_fix, (char *) d->loc4_frag); 437 429 return 1; 438 430 } 431 else if ((exp->X_op == O_divide 432 || exp->X_op == O_right_shift) 433 && d->cie_info.code_alignment > 1) 434 { 435 if (exp->X_add_symbol->bsym 436 && exp->X_op_symbol->bsym 437 && exp->X_add_symbol->sy_value.X_op == O_subtract 438 && exp->X_op_symbol->sy_value.X_op == O_constant 439 && ((exp->X_op == O_divide 440 ? exp->X_op_symbol->sy_value.X_add_number 441 : (offsetT) 1 << exp->X_op_symbol->sy_value.X_add_number) 442 == (offsetT) d->cie_info.code_alignment)) 443 { 444 /* This is a case we can optimize as well. The expression was 445 not reduced, so we can not finish the optimization until the 446 end of the assembly. We set up a variant frag which we 447 handle later. */ 448 frag_var (rs_cfa, 4, 0, d->cie_info.code_alignment << 3, 449 make_expr_symbol (&exp->X_add_symbol->sy_value), 450 d->loc4_fix, (char *) d->loc4_frag); 451 return 1; 452 } 453 } 439 454 break; 440 455 441 456 case state_error: … … 459 474 460 475 diff = resolve_symbol_value (frag->fr_symbol); 461 476 462 if (ca > 0 && diff % ca == 0 && diff / ca < 0x40) 477 assert (ca > 0); 478 diff /= ca; 479 if (diff < 0x40) 463 480 ret = 0; 464 481 else if (diff < 0x100) 465 482 ret = 1; … … 496 513 { 497 514 offsetT diff; 498 515 fragS *loc4_frag; 499 int loc4_fix ;516 int loc4_fix, ca; 500 517 501 518 loc4_frag = (fragS *) frag->fr_opcode; 502 519 loc4_fix = (int) frag->fr_offset; 503 520 504 521 diff = resolve_symbol_value (frag->fr_symbol); 505 522 523 ca = frag->fr_subtype >> 3; 524 assert (ca > 0); 525 diff /= ca; 506 526 switch (frag->fr_subtype & 7) 507 527 { 508 528 case 0: 509 { 510 int ca = frag->fr_subtype >> 3; 511 assert (ca > 0 && diff % ca == 0 && diff / ca < 0x40); 512 loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | (diff / ca); 513 } 529 assert (diff < 0x40); 530 loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | diff; 514 531 break; 515 532 516 533 case 1: -
gas/Makefile.am
diff -Naur binutils-2.19.orig/gas/Makefile.am binutils-2.19/gas/Makefile.am
old new 2159 2159 dw2gencfi.o: dw2gencfi.c dw2gencfi.h $(INCDIR)/elf/dwarf2.h \ 2160 2160 subsegs.h $(INCDIR)/obstack.h 2161 2161 ecoff.o: ecoff.c ecoff.h 2162 ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h 2162 ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h \ 2163 struc-symbol.h 2163 2164 expr.o: expr.c $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h 2164 2165 flonum-copy.o: flonum-copy.c 2165 2166 flonum-konst.o: flonum-konst.c -
gas/Makefile.in
diff -Naur binutils-2.19.orig/gas/Makefile.in binutils-2.19/gas/Makefile.in
old new 3002 3002 dw2gencfi.o: dw2gencfi.c dw2gencfi.h $(INCDIR)/elf/dwarf2.h \ 3003 3003 subsegs.h $(INCDIR)/obstack.h 3004 3004 ecoff.o: ecoff.c ecoff.h 3005 ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h 3005 ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h \ 3006 struc-symbol.h 3006 3007 expr.o: expr.c $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h 3007 3008 flonum-copy.o: flonum-copy.c 3008 3009 flonum-konst.o: flonum-konst.c -
gas/testsuite/ChangeLog
diff -Naur binutils-2.19.orig/gas/testsuite/ChangeLog binutils-2.19/gas/testsuite/ChangeLog
old new 1 2009-01-08 Adam Nemet <anemet@caviumnetworks.com> 2 3 * gas/mips/mips1-fp.s, gas/mips/mips1-fp.d, gas/mips/mips1-fp.l: 4 New tests. 5 * gas/mips/mips.exp: Run them. 6 1 7 2008-09-15 Alan Modra <amodra@bigpond.net.au> 2 8 3 9 * gas/all/gas.exp: Don't run redef tests on a bunch of targets. -
gas/testsuite/gas/mips/mips1-fp.d
diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.d binutils-2.19/gas/testsuite/gas/mips/mips1-fp.d
old new 1 #as: -32 2 #objdump: -M reg-names=numeric -dr 3 #name: MIPS1 FP instructions 4 5 .*: file format .* 6 7 Disassembly of section .text: 8 9 [0-9a-f]+ <foo>: 10 .*: 46041000 add.s \$f0,\$f2,\$f4 11 .*: 44420000 cfc1 \$2,\$0 12 #pass -
gas/testsuite/gas/mips/mips1-fp.l
diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.l binutils-2.19/gas/testsuite/gas/mips/mips1-fp.l
old new 1 .*: Assembler messages: 2 .*:6: Error: opcode not supported on this processor: .* \(.*\) `add.s \$f0,\$f2,\$f4' 3 .*:7: Error: opcode not supported on this processor: .* \(.*\) `cfc1 \$2,\$0' -
gas/testsuite/gas/mips/mips1-fp.s
diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.s binutils-2.19/gas/testsuite/gas/mips/mips1-fp.s
old new 1 # Source file used to test -mips1 fp instructions. 2 3 # This is not a complete list of mips1 FP instructions. 4 5 foo: 6 add.s $f0,$f2,$f4 7 cfc1 $2,$0 -
gas/testsuite/gas/mips/mips.exp
diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips.exp binutils-2.19/gas/testsuite/gas/mips/mips.exp
old new 398 398 run_dump_test_arches "abs" [mips_arch_list_matching mips1] 399 399 run_dump_test_arches "add" [mips_arch_list_matching mips1] 400 400 run_dump_test_arches "and" [mips_arch_list_matching mips1] 401 run_dump_test_arches "mips1-fp" [mips_arch_list_matching mips1] 402 run_list_test_arches "mips1-fp" "-32 -msoft-float" \ 403 [mips_arch_list_matching mips1] 401 404 run_dump_test "break20" 402 405 run_dump_test "trap20" 403 406 -
ld/ChangeLog
diff -Naur binutils-2.19.orig/ld/ChangeLog binutils-2.19/ld/ChangeLog
old new 1 200 8-10-05 Alan Modra <amodra@bigpond.net.au>1 2009-01-08 Dave Korn <dave.korn.cygwin@gmail.com> 2 2 3 PR 6943 4 * scripttempl/avr.sc (.bss): Set lma when relocating. 5 (.bss, .noinit): No need to set vma when relocating. 6 (.text, .bss, ,noinit): Set vma to zero when not relocating. 3 Backport bugfix from HEAD: 7 4 8 2008-09-30 Joseph Myers <joseph@codesourcery.com>5 2009-01-03 Dave Korn <dave.korn.cygwin@gmail.com> 9 6 10 * emulparams/elf64ppc.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.opd 11 and .rela.branch_lt. 7 * pe-dll.c (autofilter_liblist): Add entry for shared libgcc. 8 (libnamencmp): New function. 9 (auto_export): Use it in place of strncmp when filtering libraries. 12 10 13 2008-09-29 Nick Clifton <nickc@redhat.com> 14 15 * po/vi.po: Updated Vietnamese translation. 16 17 2008-09-09 Peter Rosin <peda@lysator.liu.se> (tiny change) 18 19 * emultempl/pe.em (pe_find_data_imports): Add trailing newline 20 to warning message. 21 * emultempl/pep.em (pep_find_data_imports): Likewise. 22 23 2008-09-09 Alan Modra <amodra@bigpond.net.au> 24 25 * Makefile.am: Run "make dep-am". 26 * Makefile.in: Regenerate. 27 * po/ld.pot: Regenerate. 28 29 2008-09-09 Alan Modra <amodra@bigpond.net.au> 30 31 * emultempl/beos.em (gld${EMULATION_NAME}_place_orphan): Updated. 32 * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Ditto. 33 34 2008-09-08 Tristan Gingold <gingold@adacore.com> 35 36 * NEWS: Add a marker for the 2.19 features. 37 38 2008-09-07 Alan Modra <amodra@bigpond.net.au> 39 40 * ldlang.h (lang_output_section_find): Define. 41 (lang_output_section_statement_lookup): Update prototype. 42 * ldlang.c (lang_output_section_find, 43 lang_output_section_statement_lookup_1): Merge into.. 44 (lang_output_section_statement_lookup): ..here. Update all callers. 45 (process_insert_statements): Set constraint negative 46 for output section statements we might be inserting. Make error 47 fatal on not finding insertion section. 48 (lang_output_section_find): Rather than comparing 49 output_section_statement.constraint against -1, test whether 50 it is postive. 51 (lang_output_section_statement_lookup_1): Likewise. 52 (output_prev_sec_find, strip_excluded_output_sections): Likewise. 53 (lang_record_phdrs): Likewise. 54 * emultempl/elf32.em (output_rel_find): Likewise. 55 * NEWS: Mention INSERT. 56 57 2008-08-26 Nick Clifton <nickc@redhat.com> 58 59 PR 6727 60 * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Scan all 61 input sections in all input bfds and always select the last 62 suitable one, so that interworking stubs are always processed 63 after all other input sections. 64 (arm_elf_before_allocation): Remove redundant use of 65 output_has_begun flag. 66 67 2008-08-24 Alan Modra <amodra@bigpond.net.au> 68 69 * configure.in: Update a number of obsolete autoconf macros. 70 * configure: Regenerate. 71 * aclocal.m4: Regenerate. 72 73 2008-08-21 Jan Kratochvil <jan.kratochvil@redhat.com> 74 75 PR ld/6833 76 * ldexp.c (fold_binary <DATA_SEGMENT_ALIGN>): Do not align 77 EXPLD.DATASEG.MIN_BASE. 78 * ldlang.c (lang_size_sections): New variable OLD_BASE. Rename 79 OLD_MIN_BASE to MIN_BASE with the former alignment from `ldexp.c'. 80 Use OLD_BASE now for the minimal base check after the base decrease by 81 the maximum alignment found. 82 83 2008-08-17 Alan Modra <amodra@bigpond.net.au> 84 85 PR 6478 86 * ldcref.c (check_local_sym_xref): Use bfd_generic_link_read_symbols. 87 Don't free symbol pointer array. 88 (check_refs): Likewise. 89 * ldmain.c (warning_callback): Likewise. 90 * ldmisc.c (vfinfo): Likewise. 91 * pe-dll.c (process_def_file): Likewise. 92 (pe_walk_relocs_of_symbol, generate_reloc): Likewise. 93 * emultempl/pe.em (pe_find_data_imports): Likewise. 94 (gld_${EMULATION_NAME}_after_open): Likewise. 95 * emultempl/pep.em (pep_find_data_imports): Likewise. 96 (gld_${EMULATION_NAME}_after_open): Likewise. 97 * ldlang.h (lang_input_statement_type): Delete asymbols, symbol_count, 98 passive_position, closed. 99 * ldlang.c (new_afile): Don't set asymbols and symbol_count. 100 * ldmain.c (add_archive_element): xcalloc lang_input_statement_type. 101 102 2008-08-15 Alan Modra <amodra@bigpond.net.au> 103 104 PR 6526 105 * configure.in: Invoke AC_USE_SYSTEM_EXTENSIONS. 106 * Makefile.in: Regenerate. 107 * aclocal.m4: Regenerate. 108 * config.in: Regenerate. 109 * configure: Regenerate. 110 111 2008-08-09 Alan Modra <amodra@bigpond.net.au> 112 113 PR 6753 114 * ldmain.c (check_for_scripts_dir, set_scripts_dir): Delete. 115 (main): Don't set_scripts_dir here. 116 * ldfile.c (check_for_scripts_dir, find_scripts_dir): New functions, 117 largely based on ldmain.c versions. 118 (ldfile_find_command_file): Set up search in script dir here without 119 affecting library search. 120 * Makefile.am (ldmain.o): No need to define SCRIPTDIR. 121 (ldfile.o): New rule. 122 * Makefile.in: Regenerate. 123 124 2008-08-08 Anatoly Sokolov <aesok@post.ru> 125 126 * Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o, 127 and eavr51.o. 128 Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c. 129 * Makefile.in: Regenerate. 130 * configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35 131 and avr51. 132 * emulparams/avr25.sh: New file. 133 * emulparams/avr31.sh: New file. 134 * emulparams/avr35.sh: New file. 135 * emulparams/avr51.sh: New file. 136 137 2008-08-08 Richard Sandiford <rdsandiford@googlemail.com> 138 Daniel Jacobowitz <dan@codesourcery.com> 139 140 * emulparams/elf32bmip.sh (GOT): Define, moving .got.plt to... 141 (OTHER_RELRO_SECTIONS, OTHER_READWRITE_SECTIONS): ...one of these 142 two variables. 143 * emulparams/elf32bmipn32-defs.sh: Likewise. 144 * emultempl/mipself.em: Include ldctor.h, elf/mips.h and elfxx-mips.h. 145 (is_mips_elf): New macro. 146 (stub_file, stub_bfd): New variables. 147 (hook_stub_info): New structure. 148 (hook_in_stub): New function. 149 (mips_add_stub_section): Likewise. 150 (mips_create_output_section_statements): Likewise. 151 (mips_before_allocation): Likewise. 152 (real_func): New variable. 153 (mips_for_each_input_file_wrapper): New function. 154 (mips_lang_for_each_input_file): Likewise. 155 (lang_for_each_input_file): Define. 156 (LDEMUL_BEFORE_ALLOCATION): Likewise. 157 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Likewise. 158 159 2008-08-08 Alan Modra <amodra@bigpond.net.au> 160 161 * ldfile.c (ldfile_open_file_search): Use concat. 162 (try_open): Don't use a fixed size pathname buffer. 163 (ldfile_find_command_file): Likewise. 164 * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): If 165 using EXTRA_SHLIB_EXTENSION, don't open twice. 166 167 2008-08-04 Alan Modra <amodra@bigpond.net.au> 168 169 * Makefile.am (POTFILES.in): Set LC_ALL=C. 170 * Makefile.in: Regenerate. 171 * po/POTFILES.in: Regenerate. 172 173 2008-08-03 Alan Modra <amodra@bigpond.net.au> 174 175 * Makefile.am (spu_ovl.o): Merge rule into.. 176 (spu_ovl.o_c): ..this one. Only run cpp for spu target. 177 * Makefile.in: Regenerate. 178 179 2008-08-02 Jan Kratochvil <jan.kratochvil@redhat.com> 180 181 Include the spu_ovl ASCII form in the repository files. 182 * emultempl/spuelf.em: No longer use `bin2c', use now `spu_ovl.o_c'. 183 * Makefile.am (eelf32_spu.c): Depend now on `spu_ovl.o_c'. 184 ($(srcdir)/emultempl/spu_ovl.o_c): New target. 185 ($(srcdir)/emultempl/spu_ovl.o): Rename to... 186 (spu_ovl.o): ...this one. 187 * Makefile.in: Regenerate. 188 * emultempl/spu_ovl.o_c: New file. 189 * emultempl/spu_ovl.o: File removed. 190 191 2008-07-31 Takashi Ono <t_ono@hkfreak.net> 192 193 * pe-dll.c (generate_relocs): Don't generate relocs for 194 undefined weak symbols. 195 196 2008-07-31 Jan Kratochvil <jan.kratochvil@redhat.com> 197 198 * emultempl/spuelf.em: Abort on the missing required `spu_ovl.o'. 199 200 2008-07-30 Alan Modra <amodra@bigpond.net.au> 201 202 * emultempl/pe.em, emultempl/pep.em: Silence gcc warnings. 203 204 2008-07-18 Joseph Myers <joseph@codesourcery.com> 205 206 * ld.texinfo (--no-wchar-size-warning): Document new ARM option. 207 * emultempl/armelf.em (no_wchar_size_warning): New. 208 (arm_elf_create_output_section_statements): Pass 209 no_wchar_size_warning to arm_elf_create_output_section_statements. 210 (OPTION_NO_WCHAR_SIZE_WARNING): New. 211 (PARSE_AND_LIST_LONGOPTS): Add no-wchar-size-warning. 212 (PARSE_AND_LIST_OPTIONS): List --no-wchar-size-warning. 213 (PARSE_AND_LIST_ARGS_CASES): Handle --no-wchar-size-warning. 214 215 2008-07-15 Jie Zhang <jie.zhang@analog.com> 216 217 * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define. 218 219 2008-07-12 Craig Silverstein <csilvers@google.com> 220 221 PR ld/6741 222 * configure.in: Check for, and include, libz.a if it is present. 223 * configure: Regenerate. 224 * config.in: Regenerate. 225 226 2008-07-12 Jie Zhang <jie.zhang@analog.com> 227 228 Revert 229 2008-07-12 Jie Zhang <jie.zhang@analog.com> 230 * Makefile.am (eelf32bfin.c): Depend on bfin.em. 231 (eelf32bfinfd.c): Likewise. 232 * Makefile.in: Regenerate. 233 * gen-doc.texi: Set Blackfin. 234 * ld.texinfo: Document --sep-code and Blackfin specific 235 options. 236 * ldmain.c (main): Initialize link_info.sep_code. 237 * lexsup.c (enum option_values): Add OPTION_SEP_CODE. 238 (ld_options[]): Add --sep-code. 239 (parse_args): Deal with --sep-code. 240 * emulparams/bfin.sh (EXTRA_EM_FILE): Define. 241 * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define. 242 * emultempl/bfin.em: New file. 243 244 2008-07-12 Jie Zhang <jie.zhang@analog.com> 245 246 * Makefile.am (eelf32bfin.c): Depend on bfin.em. 247 (eelf32bfinfd.c): Likewise. 248 * Makefile.in: Regenerate. 249 * gen-doc.texi: Set Blackfin. 250 * ld.texinfo: Document --sep-code and Blackfin specific 251 options. 252 * ldmain.c (main): Initialize link_info.sep_code. 253 * lexsup.c (enum option_values): Add OPTION_SEP_CODE. 254 (ld_options[]): Add --sep-code. 255 (parse_args): Deal with --sep-code. 256 * emulparams/bfin.sh (EXTRA_EM_FILE): Define. 257 * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define. 258 * emultempl/bfin.em: New file. 259 260 2008-07-09 Danny Smith <dannysmith@users.sourceforge.net> 261 262 *pe-dll.c (autofilter_symbolprefixlist): Excude all symbols 263 starting with ".". 264 Exclude "_IMPORT_DESCRIPTOR_". 265 (autofilter_symbolsuffixlist): Exclude "_NULL_THUNK_DATA". 266 (autofilter_symbollist_generic): Don't check for ".text". 267 Exclude "_NULL_IMPORT_DESCRIPTOR". 268 (autofilter_symbollist_i386): Likewise. 269 270 2008-07-07 Alan Modra <amodra@bigpond.net.au> 271 272 * emultempl/armelf.em (elf32_arm_add_stub_section): Use 273 bfd_make_section_with_flags. 274 * emultempl/avrelf.em (avr_elf_create_output_section_statements): 275 Likewise. 276 * emultempl/hppaelf.em (hppaelf_add_stub_section): Likewise. 277 * emultempl/m68hc1xelf.em (m68hc11elf_add_stub_section): Likewise. 278 * emultempl/m68kcoff.em (gld${EMULATION_NAME}_after_open): Likewise. 279 * emultempl/m68kelf.em (m68k_elf_after_open): Likewise. 280 * emultempl/ppc64elf.em (ppc_add_stub_section): Likewise. 281 * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation): 282 Likewise. 283 284 2008-07-06 Nathan Sidwell <nathan@codesourcery.com> 285 286 * ld.texinfo (File Commands): Document that INCLUDE can be used in 287 several different places. 288 * ldgram.y (statement, memory_spec, section): Allow INCLUDE. 289 (memory, memory_spec_list): Simplify BNF 290 (memory_spec_list_opt): New rule. 291 * ldlex.l (INCLUDE): Recognize in EXPRESSION. 292 293 2008-06-20 Alan Modra <amodra@bigpond.net.au> 294 295 * emultempl/spuelf.em (gld${EMULATION_NAME}_finish): Make "can not 296 build overlay stubs" a fatal error. 297 298 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 299 300 * config.in: Regenerate. 301 * configure: Regenerate. 302 303 2008-06-17 Alan Modra <amodra@bigpond.net.au> 304 305 * emultempl/spuelf.em (extra_stack_space): New variable. 306 (gld${EMULATION_NAME}_finish): Pass it to spu_elf_check_vma. 307 (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS, 308 PARSE_AND_LIST_ARGS_CASES): Handle --extra-stack-space. 309 * emultempl/spu_ovl.S: Mask interrupts during dma and update of 310 overlay manager structures. 311 * emultempl/spu_ovl.o: Regenerate. 312 313 2008-06-16 Hans-Peter Nilsson <hp@bitrange.com> 314 315 * ld.texinfo (@node MMIX): For the __.MMIX.start. prefix, only 316 mention it as being special for global symbols. 317 318 2008-06-12 Nick Clifton <nickc@redhat.com> 319 320 * ldlang.c (print_output_section_statement): If the output section 321 statement has an update_dot_tree expression, apply it to 322 print_dot. 323 (print_input_section): Do not update print_dot if it would move 324 print_dot backwards. 325 (lang_do_assignments_1): If the output section statement has an 326 update_dot_tree expression apply it to dot. 327 328 2008-06-07 Alan Modra <amodra@bigpond.net.au> 329 330 * NEWS: Mention archive:path patterns. 331 * ld.texinfo: Likewise. 332 * ldlang.c: Formatting throughout. 333 (archive_path): Only assume "[A-Za-z]:" is a dos drive. 334 (input_statement_is_archive_path): New function, extracted from.. 335 (walk_wild): ..here. 336 (walk_wild_consider_section): Match archive:path here too. 337 (init_map_userdata, sort_def_symbol): Convert to ISO C. 338 * ldmain.c (main): Set link_info.path_separator. 339 * emultempl/spuelf.em (choose_target): Don't set it here. 340 341 2008-06-06 Alan Modra <amodra@bigpond.net.au> 342 343 * ldlang.c (name_match): New function. 344 (unique_section_p, walk_wild_consider_section): Use it here. 345 (walk_wild_section_general): And here. 346 (archive_path): New function. 347 (walk_wild): Match archive:path filespecs. 348 (open_input_bfds): Don't load archive:path files. 349 * emultempl/spuelf.em (choose_target): Set path_separator. 350 * emulparams/elf32_spu.sh: Add ._ea.* sections to ._ea output. 351 352 2008-06-04 Nick Clifton <nickc@redhat.com> 353 354 * ld.texinfo (Orphan Sections): Fix texi typo. 355 356 2008-06-04 Chris Metcalf <cmetcalf@tilera.com> 357 358 * lexsup.c (option_values): Add OPTION_NO_WARN_FATAL. 359 (ld_options): Add entry for --no-fatal-warnings. 360 (parse_args): Handle OPTION_NO_WARN_FATAL. 361 * ld.texinfo (Options): Document new command line switch. 362 363 2008-06-04 Alan Modra <amodra@bigpond.net.au> 364 365 * emultempl/spuelf.em (spu_elf_relink): Correct --no-auto-overlay arg. 366 367 2008-06-02 Nathan Sidwell <nathan@codesourcery.com> 368 369 * ldlang.c (closest_target_match): Skip generic big and little 370 endian ELF targets. 371 372 2008-05-31 Evandro Menezes <evandro@yahoo.com> 373 374 PR ld/6430 375 * ld.h (enum sort_order): New. 376 * ldlang.c (lang_check: Fix comment. 377 (lang_common): Sort commons in ascending or descending order. 378 (lang_one_common): Likewise. 379 * lexsup.c (ld_options): Have --sort-common take an option 380 argument. 381 (parse_args): Handle argument to --sort-common. 382 * ld.texinfo (--sort-common): Document new optional argument. 383 * NEWS: Mention new feature. 384 385 2008-05-28 Christophe Lyon <christophe.lyon@st.com> 386 387 * ld.texinfo: State that farcalls stubs are supported for ARM-EABI 388 only. 389 390 2008-05-27 Kai Tietz <kai.tietz@onevision.com> 391 392 * pe-dll.c (fill_edata): Make sure we calculate vma's in 393 type bfd_vma. 394 (generate_reloc): Likewise. 395 (pe_implied_import_dll): Likewise. 396 397 2008-05-21 Nick Clifton <nickc@redhat.com> 398 399 PR ld/6519 400 * ld.texinfo (Orphan Sections): Mention that the linker will 401 provide start and stop symbols for orphaned sections if their 402 names are valid C identifiers. 403 * NEWS: Add an addendum to the description of the linker feature 404 for providing orphan section start and end symbols. 405 406 2008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com> 407 408 * configure.in (--enable-got): New option. Handle it. 409 * configure: Regenerate. 410 * config.in: Regenerate. 411 * emultempl/m68kelf.em: (got_handling_target_default): New shell 412 variable. 413 (GOT_HANDLING_TARGET_DEFAULT): New macro. 414 (GOT_HANDLING_DEFAULT): New macro. Initialize it from configure 415 option if one was given. 416 (got_handling): New static variable. 417 (elf_m68k_create_output_section_statements): New static function 418 implementing hook. 419 (PARSE_AND_LIST_PROLOGUE): Define shell variable. 420 (OPTION_GOT): New macro. 421 (PARSE_AND_LIST_LONGOPTS): Define shell variable. Specify 422 --got option. 423 (got): New linker option. 424 (PARSE_AND_LIST_OPTIONS): Define shell variable. Print help string 425 for --got option. 426 (PARSE_AND_LIST_ARGS_CASES): Define shell variable. Handle --got 427 option. 428 * ld.texinfo: Document --got=<type> option. 429 * gen-doc.texi: Add M68K. 430 * NEWS: Mention the new feature. 431 432 2008-05-21 Evandro Menezes <evandro@yahoo.com> 433 434 PR ld/6430 435 * ld.texinfo (--sort-common): Correct documentation to indicate 436 that sorting is performed by alignment, not size, biggest 437 alignment first. 438 439 2008-05-21 Christophe Lyon <christophe.lyon@st.com> 440 Nick Clifton <nickc@redhat.com> 441 442 * ld.texinfo (ARM): Document --stub-group-size=N option. 443 Move description of --pic-veneer option into the ARM section. 444 * NEWS: Mention the support for long function calls. 445 446 2008-05-15 Christophe Lyon <christophe.lyon@st.com> 447 448 * emultempl/armelf.em (build_section_lists): New function. 449 (stub_file): Define. 450 (need_laying_out): Define. 451 (group_size): Define. 452 (hook_stub_info): Define. 453 (hook_in_stub): New function. 454 (elf32_arm_add_stub_section): New function. 455 (gldarm_layout_sections_again): New function. 456 (gld${EMULATION_NAME}_finish): Replace arm_elf_finish(). Generate 457 stubs for long calls if needed. 458 (arm_elf_create_output_section_statements): create stub_file bfd. 459 (arm_for_each_input_file_wrapper): New function. 460 (arm_lang_for_each_input_file): New function. 461 (lang_for_each_input_file): Define. 462 (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_STUBGROUP_SIZE. 463 (PARSE_AND_LIST_LONGOPTS): Add option stub-group-size. 464 (PARSE_AND_LIST_OPTIONS): Add option stub-group-size. 465 (PARSE_AND_LIST_ARGS_CASES): Add OPTION_STUBGROUP_SIZE case. 466 (LDEMUL_FINISH): Update to gld${EMULATION_NAME}_finish. 467 * lang.c (print_input_statement): Skip if bfd has 468 BFD_LINKER_CREATED. 469 470 2008-05-14 Alan Modra <amodra@bigpond.net.au> 471 472 * Makefile.in: Regenerate. 473 474 2008-05-09 Kai Tietz <kai.tietz@onevision.com> 475 476 ld/PR6502 477 * emultempl/pep.em (compute_dll_image_base): Use bfd_vma instead 478 of long and change return type to bfd_vma. 479 (definfo): Change type of address from long to bfd_vma. 480 (set_pep_value): Replace strtoul to strtoull. 481 (gld_${EMULATION_NAME}_set_symbols): use bfd_vma instead of long.. 482 * pe-dll.c (pe_dll_generate_def_file): Use fprintf_vma to print 483 ImageBase. 484 (quick_reloc): Change argument address from int to bfd_size_type. 485 486 2008-05-08 Tom Tromey <tromey@redhat.com> 487 488 * ld.texinfo (PowerPC64 ELF64): Fix typo. 489 490 2008-05-08 Alan Modra <amodra@bigpond.net.au> 491 492 * elf32_spu.sh (OTHER_SECTIONS): Add "._ea". 493 * elf32ppc.sh: If building with spu support, put ".data.spehandle" 494 sections at the start of ".data" and provide a symbol to locate 495 the directory of embedded spe programs. 496 497 2008-05-08 Alan Modra <amodra@bigpond.net.au> 498 499 * ldexp.c (exp_print_token): Add ABSOLUTE, MIN_K, ASSERT_K. Correct 500 MAX_K. 501 (fold_binary <SEGMENT_START>): Set expld.result.section to 502 current section. Expand comment. Formatting. 503 (fold_name <DEFINED>): Set expld.result.section to current section. 504 505 2008-04-28 Nathan Sidwell <nathan@codesourcery.com> 506 507 * ldlang.c (lang_size_sections_1): Don't check LMA overflow on 508 non-load sections. 509 510 2008-04-25 Michael Frysinger <vapier@gentoo.org> 511 512 * configure.tgt (bfin-*-linux-uclibc*): Set targ_emul to elf32bfinfd 513 and targ_extra_emuls to elf32bfin. 514 515 2008-04-23 Paolo Bonzini <bonzini@gnu.org> 516 517 * aclocal.m4: Regenerate. 518 * configure: Regenerate. 519 520 2008-04-03 Kai Tietz <kai.tietz@onevision.com> 521 522 * scripttempl/pep.sc: Align start of symbol __CTOR_LIST__. 523 524 2008-04-08 Alan Modra <amodra@bigpond.net.au> 525 526 * po/POTFILES.in: Regenerate. 527 528 2008-04-08 Alan Modra <amodra@bigpond.net.au> 529 530 * emultempl/spuelf.em (auto_overlay, auto_overlay_file, 531 auto_overlay_fixed, auto_overlay_reserved, my_argc, my_argv): New vars. 532 (spu_before_allocation): Warn on --auto-overlay and existing overlays. 533 (struct tflist, clean_tmp): Move. 534 (new_tmp_file): New function, extracted from.. 535 (embedded_spu_file): ..here. 536 (spu_elf_open_overlay_script, spu_elf_relink): New function. 537 (gld${EMULATION_NAME}_finish): Pass a bunch of --auto-overlay params. 538 Warn on --auto-overlay and zero local store. 539 (gld${EMULATION_NAME}_choose_target): New function to stash argv. 540 (OPTION_SPU_AUTO_OVERLAY, OPTION_SPU_AUTO_RELINK, 541 OPTION_SPU_OVERLAY_RODATA, OPTION_SPU_FIXED_SPACE, 542 OPTION_SPU_RESERVED_SPACE, OPTION_SPU_NO_AUTO_OVERLAY): Define. 543 (PARSE_AND_LIST_LONGOPTS): Add entries for new options. 544 (PARSE_AND_LIST_OPTIONS): Likewise. 545 (PARSE_AND_LIST_ARGS_CASES): Likewise. 546 (LDEMUL_CHOOSE_TARGET): Define. 547 548 2008-04-03 Kai Tietz <kai.tietz@onevision.com> 549 550 PR ld/6026 551 * pe-dll.c (make_head): Fix iat and thunk addend offset. 552 553 2008-03-31 Nick Clifton <nickc@redhat.com> 554 555 * po/fr.po: Updated French translation. 556 557 2008-03-24 Ian Lance Taylor <iant@google.com> 558 559 The sha1 code is now in libiberty. 560 * sha1.c: Remove. 561 * sha1.h: Remove. 562 * Makefile.am (CFILES): Remove sha1.c. 563 (HFILES): Remove sha1.h. 564 (OFILES): Remove sha1.o. 565 (ld_new_SOURCES): Remove sha1.c. 566 (sha1.o): Remove target. 567 * Makefile.in: Rebuild. 568 569 2008-03-20 Alan Modra <amodra@bigpond.net.au> 570 571 * emultempl/spuelf.em: Update calls to elf32-spu.c funcs. 572 573 2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 574 575 * aclocal.m4: Regenerate. 576 * configure: Likewise. 577 * Makefile.in: Likewise. 578 579 2008-03-14 Alan Modra <amodra@bigpond.net.au> 580 581 * emultempl/spuelf.em (gld${EMULATION_NAME}_finish): Protect 582 spu_elf_build_stubs with is_spu_target. 583 584 2008-03-13 Alan Modra <amodra@bigpond.net.au> 585 586 * Makefile.am: Run "make dep-am". 587 * Makefile.in: Regenerate. 588 * configure: Regenerate. 589 590 2008-03-06 Joseph Myers <joseph@codesourcery.com> 591 Roman Zippel <zippel@linux-m68k.org> 592 593 * emulparams/m68kelf.sh (GENERATE_PIE_SCRIPT): Define. 594 (COMMONPAGESIZE): Define. 595 596 2008-02-22 Nick Clifton <nickc@redhat.com> 597 598 PR ld/5785 599 * ldlang.c (lang_size_sections_1): Honour the setting of an 600 lma_region even if there is no vma region set, or the vma region 601 is the same as the lma region. 602 603 2008-02-18 Nick Clifton <nickc@redhat.com> 604 605 * scripttempl/armbpabi.sc (ENTRY): Do not define when performing a 606 relocatable link. 607 * scripttempl/elf32cr16.sc: Likewise. 608 * scripttempl/elf32cr16c.sc: Likewise. 609 * scripttempl/elf32crx.sc: Likewise. 610 * scripttempl/elf32sh-symbian.sc: Likewise. 611 * scripttempl/elf_chaos.sc: Likewise. 612 * scripttempl/elfd10v.sc: Likewise. 613 * scripttempl/elfi370.sc: Likewise. 614 * scripttempl/elfm68hc11.sc: Likewise. 615 * scripttempl/elfm68hc12.sc: Likewise. 616 * scripttempl/ip2k.sc: Likewise. 617 * scripttempl/iq2000.sc: Likewise. 618 * scripttempl/mep.sc: Likewise. 619 * scripttempl/v850.sc: Likewise. 620 * scripttempl/xstormy16.sc: Likewise. 621 622 2008-02-16 Alan Modra <amodra@bigpond.net.au> 623 624 PR ld/5761 625 * ldexp.c (fold_name <LOADADDR>): Check result of evaluating 626 load_base before calling make_abs. 627 628 2008-02-15 Alan Modra <amodra@bigpond.net.au> 629 630 * emultempl/alphaelf.em (alpha_after_open): Use elf_object_id. 631 * emultempl/hppaelf.em (hppaelf_create_output_section_statements): 632 Likewise. 633 * emultempl/ppc64elf.em (ppc_create_output_section_statements): 634 Likewise. 635 * emultempl/ppc32elf.em (is_ppc_elf32_vec): Delete. Replace all 636 uses with.. 637 (is_ppc_elf): ..this new macro. 638 639 2008-02-15 Alan Modra <amodra@bigpond.net.au> 640 641 * ldmain.h (output_bfd): Delete. 642 * ldmain.c (output_bfd): Delete. 643 Replace all occurrences of output_bfd with link_info.output_bfd. 644 * ldcref.c: Likewise. 645 * ldctor.c: Likewise. 646 * ldemul.c: Likewise. 647 * ldexp.c: Likewise. 648 * ldfile.c: Likewise. 649 * ldlang.c: Likewise. 650 * ldmisc.c: Likewise. 651 * ldwrite.c: Likewise. 652 * pe-dll.c: Likewise. 653 * emultempl/aix.em: Likewise. 654 * emultempl/alphaelf.em: Likewise. 655 * emultempl/armcoff.em: Likewise. 656 * emultempl/armelf.em: Likewise. 657 * emultempl/avrelf.em: Likewise. 658 * emultempl/beos.em: Likewise. 659 * emultempl/elf-generic.em: Likewise. 660 * emultempl/elf32.em: Likewise. 661 * emultempl/gld960.em: Likewise. 662 * emultempl/hppaelf.em: Likewise. 663 * emultempl/irix.em: Likewise. 664 * emultempl/linux.em: Likewise. 665 * emultempl/lnk960.em: Likewise. 666 * emultempl/m68hc1xelf.em: Likewise. 667 * emultempl/mmix-elfnmmo.em: Likewise. 668 * emultempl/mmo.em: Likewise. 669 * emultempl/pe.em: Likewise. 670 * emultempl/pep.em: Likewise. 671 * emultempl/ppc32elf.em: Likewise. 672 * emultempl/ppc64elf.em: Likewise. 673 * emultempl/scoreelf.em: Likewise. 674 * emultempl/sh64elf.em: Likewise. 675 * emultempl/spuelf.em: Likewise. 676 * emultempl/sunos.em: Likewise. 677 * emultempl/vanilla.em: Likewise. 678 * emultempl/vxworks.em: Likewise. 679 * emultempl/xtensaelf.em: Likewise. 680 * emultempl/z80.em: Likewise. 681 * ldlang.c (open_output): Don't return output, instead write 682 link_info_output_bfd directly. 683 * emultempl/alphaelf.em: Replace occurrences of link_info.hash->creator 684 with link_info.output_bfd->xvec. 685 * emultempl/hppaelf.em: Likewise. 686 * emultempl/ppc32elf.em: Likewise. 687 * emultempl/ppc64elf.em: Likewise. 688 * emultempl/spuelf.em: Likewise. 689 690 2008-02-07 Alan Modra <amodra@bigpond.net.au> 691 692 * ldlang.c (new_afile): Don't pass unadorned NULL to concat. 693 * ldfile.c (ldfile_add_library_path): Likewise. 694 * emultempl/elf32.em (check_ld_elf_hints, check_ld_so_conf): Likewise. 695 * emultempl/lnk960.em (lnk960_before_parse): Likewise. 696 * emultempl/spuelf.em (embedded_spu_file): Likewise. 697 698 2008-02-07 Alan Modra <amodra@bigpond.net.au> 699 700 * emultempl/spu_ovl.S: Use low bit of _ovly_table.size as 701 a "present" bit rather than low bit of .buf. Correct indexing 702 into _ovly_buf_table. Use relative loads and stores to access 703 overlay manager local vars. 704 * emultempl/spu_ovl.o: Regenerate. 705 706 2008-02-04 H.J. Lu <hongjiu.lu@intel.com> 707 708 PR 5715 709 * configure: Regenerated. 710 711 2008-01-31 Marc Gauthier <marc@tensilica.com> 712 713 * configure.tgt (xtensa*-*-*): Recognize processor variants. 714 715 2008-01-28 Fabian Groffen <grobian@gentoo.org> 716 717 * configure.tgt (x86_64-*-solaris2): Add support for this target. 718 719 2008-01-28 Vincent Riviere <vincent.riviere@freesbee.fr> 720 721 PR ld/5652 722 * genscripts.sh: Check for the existence of BASH_LINENO not just 723 the BASH shell before generating line numbers in the emulation 724 file. 725 726 2008-01-28 Alan Modra <amodra@bigpond.net.au> 727 728 * emultempl/spu_ovl.S: Rewrite. 729 * emultempl/spu_ovl.o: Regenerate. 730 * emultempl/spuelf.em (toe): Delete. 731 (spu_place_special_section): Add param to control section placement. 732 Adjust callers. 733 (spu_elf_load_ovl_mgr): Adjust for struct _spu_elf_section_data 734 changes. 735 (spu_before_allocation): Adjust spu_elf_size_stubs call. 736 (gld${EMULATION_NAME}_finish): Adjust spu_elf_build_stubs call. 737 738 2008-01-25 H.J. Lu <hongjiu.lu@intel.com> 739 740 PR ld/5670 741 * ldlang.c (process_insert_statements): Silence gcc 4.1 alias 742 warning. 743 744 2008-01-25 Alan Modra <amodra@bigpond.net.au> 745 746 * ld.texinfo (INSERT): Describe. 747 * ldgram.y (ldgram_in_script, ldgram_had_equals): Delete. 748 (INSERT_K, AFTER, BEFORE): Add as tokens. 749 (ifile_p1): Handle INSERT statements. 750 (saved_script_handle, force_make_executable): Move to.. 751 * ldmain.c: ..here. 752 (previous_script_handle): New global var. 753 * ldmain.h (saved_script_handle, force_make_executable): Declare. 754 (previous_script_handle): Likewise. 755 * ldlex.l (INSERT_K, AFTER, BEFORE): Add tokens. 756 * lexsup.c (parge_args <-T>): Set previous_script_handle. 757 * ldlang.c (lang_for_each_statement_worker): Handle insert statement. 758 (map_input_to_output_sections, print_statement): Likewise. 759 (lang_size_sections_1, lang_do_assignments_1): Likewise. 760 (insert_os_after): New function, extracted from.. 761 (lang_insert_orphan): ..here. 762 (process_insert_statements): New function. 763 (lang_process): Call it. 764 (lang_add_insert): New function. 765 * ldlang.h (lang_insert_statement_enum): New. 766 (lang_insert_statement_type): New. 767 (lang_statement_union_type): Add insert_statement. 768 (lang_add_insert): Declare. 769 770 2008-01-18 Bob Wilson <bob.wilson@acm.org> 771 772 * scripttempl/elfxtensa.sc: Merge ENTRY and .note.gnu.build-id 773 changes from elf.sc. 774 775 2008-01-16 Alan Modra <amodra@bigpond.net.au> 776 777 * ldlang.c (lang_size_sections_1): Simplify SEC_NEVER_LOAD test. 778 779 2008-01-16 Alan Modra <amodra@bigpond.net.au> 780 781 * ldlang.h (lang_afile_asection_pair_statement_enum): Delete. 782 (lang_afile_asection_pair_statement_type): Delete. 783 (lang_statement_union_type): Delete afile_asection_pair_statement. 784 * ldlang.c (lang_insert_orphan): Delete case handling the above. 785 (map_input_to_output_sections, print_statement): Likewise. 786 787 2008-01-15 Kaz Kojima <kkojima@rr.iij4u.or.jp> 788 789 * emulparams/shlelf_linux.sh (DATA_START_SYMBOLS): Use PROVIDE 790 with __data_start. 791 * emulparams/shelf_nbsd.sh (DATA_START_SYMBOLS): Likewise. 792 793 2008-01-15 Alan Modra <amodra@bigpond.net.au> 794 795 PR 5604 796 * ldlang.c (lang_gc_sections): Move code to set SEC_KEEP on entry 797 syms to _bfd_elf_gc_keep. 798 * emultempl/ppc64elf.em (ppc_before_allocation): Don't call 799 ppc64_elf_edit_opd if no_opd_opt. 800 801 2008-01-11 Tristan Gingold <gingold@adacore.com> 802 Eric Botcazou <ebotcazou@adacore.com> 803 804 * ldlang.c (lang_end): Warns if the entry point is not found when 805 --gc-sections. 806 Emit an error if no root is specified when --gc-sections -r. 807 * ld.texinfo (Options): Document that --gc-sections is compatible 808 with -r and -q. 809 * ldmain.c (main): Do not error out if -r and --gc-sections. 810 * scripttempl/elf.sc: Emit ENTRY command only if relocating. 811 812 2008-01-10 Daniel Jacobowitz <drow@sources.redhat.com> 813 814 PR ld/5533 815 * ldlang.c (lang_end): Issue a warning for a missing start symbol 816 of a shared library if the symbol was specified on the command 817 line. 818 819 2008-01-10 Alan Modra <amodra@bigpond.net.au> 820 821 * ld.texinfo (--gc-sections): Describe linker behaviour. 822 823 For older changes see ChangeLog-2007 11 For older changes see ChangeLog-2008 824 12 825 13 826 14 Local Variables: -
ld/ChangeLog-2008
mode: change-log @@ -828,3 +16,4 @@ fill-column: 74 version-control: never End: + diff -Naur binutils-2.19.orig/ld/ChangeLog-2008 binutils-2.19/ld/ChangeLog-2008
old new 1 2008-12-23 Tristan Gingold <gingold@adacore.com> 2 3 * Makefile.am (EXTRA_DIST): Add deffilep.c and deffilep.h 4 * Makefile.in: Regenerate. 5 6 2008-11-14 Alan Modra <amodra@bigpond.net.au> 7 8 * Makefile.am (spu_ovl.o_c): Add missing line continuations. 9 * Makefile.in: Regenerate. 10 11 2008-10-05 Alan Modra <amodra@bigpond.net.au> 12 13 PR 6943 14 * scripttempl/avr.sc (.bss): Set lma when relocating. 15 (.bss, .noinit): No need to set vma when relocating. 16 (.text, .bss, ,noinit): Set vma to zero when not relocating. 17 18 2008-09-30 Joseph Myers <joseph@codesourcery.com> 19 20 * emulparams/elf64ppc.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.opd 21 and .rela.branch_lt. 22 23 2008-09-29 Nick Clifton <nickc@redhat.com> 24 25 * po/vi.po: Updated Vietnamese translation. 26 27 2008-09-09 Peter Rosin <peda@lysator.liu.se> (tiny change) 28 29 * emultempl/pe.em (pe_find_data_imports): Add trailing newline 30 to warning message. 31 * emultempl/pep.em (pep_find_data_imports): Likewise. 32 33 2008-09-09 Alan Modra <amodra@bigpond.net.au> 34 35 * Makefile.am: Run "make dep-am". 36 * Makefile.in: Regenerate. 37 * po/ld.pot: Regenerate. 38 39 2008-09-09 Alan Modra <amodra@bigpond.net.au> 40 41 * emultempl/beos.em (gld${EMULATION_NAME}_place_orphan): Updated. 42 * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Ditto. 43 44 2008-09-08 Tristan Gingold <gingold@adacore.com> 45 46 * NEWS: Add a marker for the 2.19 features. 47 48 2008-09-07 Alan Modra <amodra@bigpond.net.au> 49 50 * ldlang.h (lang_output_section_find): Define. 51 (lang_output_section_statement_lookup): Update prototype. 52 * ldlang.c (lang_output_section_find, 53 lang_output_section_statement_lookup_1): Merge into.. 54 (lang_output_section_statement_lookup): ..here. Update all callers. 55 (process_insert_statements): Set constraint negative 56 for output section statements we might be inserting. Make error 57 fatal on not finding insertion section. 58 (lang_output_section_find): Rather than comparing 59 output_section_statement.constraint against -1, test whether 60 it is postive. 61 (lang_output_section_statement_lookup_1): Likewise. 62 (output_prev_sec_find, strip_excluded_output_sections): Likewise. 63 (lang_record_phdrs): Likewise. 64 * emultempl/elf32.em (output_rel_find): Likewise. 65 * NEWS: Mention INSERT. 66 67 2008-08-26 Nick Clifton <nickc@redhat.com> 68 69 PR 6727 70 * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Scan all 71 input sections in all input bfds and always select the last 72 suitable one, so that interworking stubs are always processed 73 after all other input sections. 74 (arm_elf_before_allocation): Remove redundant use of 75 output_has_begun flag. 76 77 2008-08-24 Alan Modra <amodra@bigpond.net.au> 78 79 * configure.in: Update a number of obsolete autoconf macros. 80 * configure: Regenerate. 81 * aclocal.m4: Regenerate. 82 83 2008-08-21 Jan Kratochvil <jan.kratochvil@redhat.com> 84 85 PR ld/6833 86 * ldexp.c (fold_binary <DATA_SEGMENT_ALIGN>): Do not align 87 EXPLD.DATASEG.MIN_BASE. 88 * ldlang.c (lang_size_sections): New variable OLD_BASE. Rename 89 OLD_MIN_BASE to MIN_BASE with the former alignment from `ldexp.c'. 90 Use OLD_BASE now for the minimal base check after the base decrease by 91 the maximum alignment found. 92 93 2008-08-17 Alan Modra <amodra@bigpond.net.au> 94 95 PR 6478 96 * ldcref.c (check_local_sym_xref): Use bfd_generic_link_read_symbols. 97 Don't free symbol pointer array. 98 (check_refs): Likewise. 99 * ldmain.c (warning_callback): Likewise. 100 * ldmisc.c (vfinfo): Likewise. 101 * pe-dll.c (process_def_file): Likewise. 102 (pe_walk_relocs_of_symbol, generate_reloc): Likewise. 103 * emultempl/pe.em (pe_find_data_imports): Likewise. 104 (gld_${EMULATION_NAME}_after_open): Likewise. 105 * emultempl/pep.em (pep_find_data_imports): Likewise. 106 (gld_${EMULATION_NAME}_after_open): Likewise. 107 * ldlang.h (lang_input_statement_type): Delete asymbols, symbol_count, 108 passive_position, closed. 109 * ldlang.c (new_afile): Don't set asymbols and symbol_count. 110 * ldmain.c (add_archive_element): xcalloc lang_input_statement_type. 111 112 2008-08-15 Alan Modra <amodra@bigpond.net.au> 113 114 PR 6526 115 * configure.in: Invoke AC_USE_SYSTEM_EXTENSIONS. 116 * Makefile.in: Regenerate. 117 * aclocal.m4: Regenerate. 118 * config.in: Regenerate. 119 * configure: Regenerate. 120 121 2008-08-09 Alan Modra <amodra@bigpond.net.au> 122 123 PR 6753 124 * ldmain.c (check_for_scripts_dir, set_scripts_dir): Delete. 125 (main): Don't set_scripts_dir here. 126 * ldfile.c (check_for_scripts_dir, find_scripts_dir): New functions, 127 largely based on ldmain.c versions. 128 (ldfile_find_command_file): Set up search in script dir here without 129 affecting library search. 130 * Makefile.am (ldmain.o): No need to define SCRIPTDIR. 131 (ldfile.o): New rule. 132 * Makefile.in: Regenerate. 133 134 2008-08-08 Anatoly Sokolov <aesok@post.ru> 135 136 * Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o, 137 and eavr51.o. 138 Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c. 139 * Makefile.in: Regenerate. 140 * configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35 141 and avr51. 142 * emulparams/avr25.sh: New file. 143 * emulparams/avr31.sh: New file. 144 * emulparams/avr35.sh: New file. 145 * emulparams/avr51.sh: New file. 146 147 2008-08-08 Richard Sandiford <rdsandiford@googlemail.com> 148 Daniel Jacobowitz <dan@codesourcery.com> 149 150 * emulparams/elf32bmip.sh (GOT): Define, moving .got.plt to... 151 (OTHER_RELRO_SECTIONS, OTHER_READWRITE_SECTIONS): ...one of these 152 two variables. 153 * emulparams/elf32bmipn32-defs.sh: Likewise. 154 * emultempl/mipself.em: Include ldctor.h, elf/mips.h and elfxx-mips.h. 155 (is_mips_elf): New macro. 156 (stub_file, stub_bfd): New variables. 157 (hook_stub_info): New structure. 158 (hook_in_stub): New function. 159 (mips_add_stub_section): Likewise. 160 (mips_create_output_section_statements): Likewise. 161 (mips_before_allocation): Likewise. 162 (real_func): New variable. 163 (mips_for_each_input_file_wrapper): New function. 164 (mips_lang_for_each_input_file): Likewise. 165 (lang_for_each_input_file): Define. 166 (LDEMUL_BEFORE_ALLOCATION): Likewise. 167 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Likewise. 168 169 2008-08-08 Alan Modra <amodra@bigpond.net.au> 170 171 * ldfile.c (ldfile_open_file_search): Use concat. 172 (try_open): Don't use a fixed size pathname buffer. 173 (ldfile_find_command_file): Likewise. 174 * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): If 175 using EXTRA_SHLIB_EXTENSION, don't open twice. 176 177 2008-08-04 Alan Modra <amodra@bigpond.net.au> 178 179 * Makefile.am (POTFILES.in): Set LC_ALL=C. 180 * Makefile.in: Regenerate. 181 * po/POTFILES.in: Regenerate. 182 183 2008-08-03 Alan Modra <amodra@bigpond.net.au> 184 185 * Makefile.am (spu_ovl.o): Merge rule into.. 186 (spu_ovl.o_c): ..this one. Only run cpp for spu target. 187 * Makefile.in: Regenerate. 188 189 2008-08-02 Jan Kratochvil <jan.kratochvil@redhat.com> 190 191 Include the spu_ovl ASCII form in the repository files. 192 * emultempl/spuelf.em: No longer use `bin2c', use now `spu_ovl.o_c'. 193 * Makefile.am (eelf32_spu.c): Depend now on `spu_ovl.o_c'. 194 ($(srcdir)/emultempl/spu_ovl.o_c): New target. 195 ($(srcdir)/emultempl/spu_ovl.o): Rename to... 196 (spu_ovl.o): ...this one. 197 * Makefile.in: Regenerate. 198 * emultempl/spu_ovl.o_c: New file. 199 * emultempl/spu_ovl.o: File removed. 200 201 2008-07-31 Takashi Ono <t_ono@hkfreak.net> 202 203 * pe-dll.c (generate_relocs): Don't generate relocs for 204 undefined weak symbols. 205 206 2008-07-31 Jan Kratochvil <jan.kratochvil@redhat.com> 207 208 * emultempl/spuelf.em: Abort on the missing required `spu_ovl.o'. 209 210 2008-07-30 Alan Modra <amodra@bigpond.net.au> 211 212 * emultempl/pe.em, emultempl/pep.em: Silence gcc warnings. 213 214 2008-07-18 Joseph Myers <joseph@codesourcery.com> 215 216 * ld.texinfo (--no-wchar-size-warning): Document new ARM option. 217 * emultempl/armelf.em (no_wchar_size_warning): New. 218 (arm_elf_create_output_section_statements): Pass 219 no_wchar_size_warning to arm_elf_create_output_section_statements. 220 (OPTION_NO_WCHAR_SIZE_WARNING): New. 221 (PARSE_AND_LIST_LONGOPTS): Add no-wchar-size-warning. 222 (PARSE_AND_LIST_OPTIONS): List --no-wchar-size-warning. 223 (PARSE_AND_LIST_ARGS_CASES): Handle --no-wchar-size-warning. 224 225 2008-07-15 Jie Zhang <jie.zhang@analog.com> 226 227 * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define. 228 229 2008-07-12 Craig Silverstein <csilvers@google.com> 230 231 PR ld/6741 232 * configure.in: Check for, and include, libz.a if it is present. 233 * configure: Regenerate. 234 * config.in: Regenerate. 235 236 2008-07-12 Jie Zhang <jie.zhang@analog.com> 237 238 Revert 239 2008-07-12 Jie Zhang <jie.zhang@analog.com> 240 * Makefile.am (eelf32bfin.c): Depend on bfin.em. 241 (eelf32bfinfd.c): Likewise. 242 * Makefile.in: Regenerate. 243 * gen-doc.texi: Set Blackfin. 244 * ld.texinfo: Document --sep-code and Blackfin specific 245 options. 246 * ldmain.c (main): Initialize link_info.sep_code. 247 * lexsup.c (enum option_values): Add OPTION_SEP_CODE. 248 (ld_options[]): Add --sep-code. 249 (parse_args): Deal with --sep-code. 250 * emulparams/bfin.sh (EXTRA_EM_FILE): Define. 251 * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define. 252 * emultempl/bfin.em: New file. 253 254 2008-07-12 Jie Zhang <jie.zhang@analog.com> 255 256 * Makefile.am (eelf32bfin.c): Depend on bfin.em. 257 (eelf32bfinfd.c): Likewise. 258 * Makefile.in: Regenerate. 259 * gen-doc.texi: Set Blackfin. 260 * ld.texinfo: Document --sep-code and Blackfin specific 261 options. 262 * ldmain.c (main): Initialize link_info.sep_code. 263 * lexsup.c (enum option_values): Add OPTION_SEP_CODE. 264 (ld_options[]): Add --sep-code. 265 (parse_args): Deal with --sep-code. 266 * emulparams/bfin.sh (EXTRA_EM_FILE): Define. 267 * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define. 268 * emultempl/bfin.em: New file. 269 270 2008-07-09 Danny Smith <dannysmith@users.sourceforge.net> 271 272 *pe-dll.c (autofilter_symbolprefixlist): Excude all symbols 273 starting with ".". 274 Exclude "_IMPORT_DESCRIPTOR_". 275 (autofilter_symbolsuffixlist): Exclude "_NULL_THUNK_DATA". 276 (autofilter_symbollist_generic): Don't check for ".text". 277 Exclude "_NULL_IMPORT_DESCRIPTOR". 278 (autofilter_symbollist_i386): Likewise. 279 280 2008-07-07 Alan Modra <amodra@bigpond.net.au> 281 282 * emultempl/armelf.em (elf32_arm_add_stub_section): Use 283 bfd_make_section_with_flags. 284 * emultempl/avrelf.em (avr_elf_create_output_section_statements): 285 Likewise. 286 * emultempl/hppaelf.em (hppaelf_add_stub_section): Likewise. 287 * emultempl/m68hc1xelf.em (m68hc11elf_add_stub_section): Likewise. 288 * emultempl/m68kcoff.em (gld${EMULATION_NAME}_after_open): Likewise. 289 * emultempl/m68kelf.em (m68k_elf_after_open): Likewise. 290 * emultempl/ppc64elf.em (ppc_add_stub_section): Likewise. 291 * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation): 292 Likewise. 293 294 2008-07-06 Nathan Sidwell <nathan@codesourcery.com> 295 296 * ld.texinfo (File Commands): Document that INCLUDE can be used in 297 several different places. 298 * ldgram.y (statement, memory_spec, section): Allow INCLUDE. 299 (memory, memory_spec_list): Simplify BNF 300 (memory_spec_list_opt): New rule. 301 * ldlex.l (INCLUDE): Recognize in EXPRESSION. 302 303 2008-06-20 Alan Modra <amodra@bigpond.net.au> 304 305 * emultempl/spuelf.em (gld${EMULATION_NAME}_finish): Make "can not 306 build overlay stubs" a fatal error. 307 308 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 309 310 * config.in: Regenerate. 311 * configure: Regenerate. 312 313 2008-06-17 Alan Modra <amodra@bigpond.net.au> 314 315 * emultempl/spuelf.em (extra_stack_space): New variable. 316 (gld${EMULATION_NAME}_finish): Pass it to spu_elf_check_vma. 317 (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS, 318 PARSE_AND_LIST_ARGS_CASES): Handle --extra-stack-space. 319 * emultempl/spu_ovl.S: Mask interrupts during dma and update of 320 overlay manager structures. 321 * emultempl/spu_ovl.o: Regenerate. 322 323 2008-06-16 Hans-Peter Nilsson <hp@bitrange.com> 324 325 * ld.texinfo (@node MMIX): For the __.MMIX.start. prefix, only 326 mention it as being special for global symbols. 327 328 2008-06-12 Nick Clifton <nickc@redhat.com> 329 330 * ldlang.c (print_output_section_statement): If the output section 331 statement has an update_dot_tree expression, apply it to 332 print_dot. 333 (print_input_section): Do not update print_dot if it would move 334 print_dot backwards. 335 (lang_do_assignments_1): If the output section statement has an 336 update_dot_tree expression apply it to dot. 337 338 2008-06-07 Alan Modra <amodra@bigpond.net.au> 339 340 * NEWS: Mention archive:path patterns. 341 * ld.texinfo: Likewise. 342 * ldlang.c: Formatting throughout. 343 (archive_path): Only assume "[A-Za-z]:" is a dos drive. 344 (input_statement_is_archive_path): New function, extracted from.. 345 (walk_wild): ..here. 346 (walk_wild_consider_section): Match archive:path here too. 347 (init_map_userdata, sort_def_symbol): Convert to ISO C. 348 * ldmain.c (main): Set link_info.path_separator. 349 * emultempl/spuelf.em (choose_target): Don't set it here. 350 351 2008-06-06 Alan Modra <amodra@bigpond.net.au> 352 353 * ldlang.c (name_match): New function. 354 (unique_section_p, walk_wild_consider_section): Use it here. 355 (walk_wild_section_general): And here. 356 (archive_path): New function. 357 (walk_wild): Match archive:path filespecs. 358 (open_input_bfds): Don't load archive:path files. 359 * emultempl/spuelf.em (choose_target): Set path_separator. 360 * emulparams/elf32_spu.sh: Add ._ea.* sections to ._ea output. 361 362 2008-06-04 Nick Clifton <nickc@redhat.com> 363 364 * ld.texinfo (Orphan Sections): Fix texi typo. 365 366 2008-06-04 Chris Metcalf <cmetcalf@tilera.com> 367 368 * lexsup.c (option_values): Add OPTION_NO_WARN_FATAL. 369 (ld_options): Add entry for --no-fatal-warnings. 370 (parse_args): Handle OPTION_NO_WARN_FATAL. 371 * ld.texinfo (Options): Document new command line switch. 372 373 2008-06-04 Alan Modra <amodra@bigpond.net.au> 374 375 * emultempl/spuelf.em (spu_elf_relink): Correct --no-auto-overlay arg. 376 377 2008-06-02 Nathan Sidwell <nathan@codesourcery.com> 378 379 * ldlang.c (closest_target_match): Skip generic big and little 380 endian ELF targets. 381 382 2008-05-31 Evandro Menezes <evandro@yahoo.com> 383 384 PR ld/6430 385 * ld.h (enum sort_order): New. 386 * ldlang.c (lang_check: Fix comment. 387 (lang_common): Sort commons in ascending or descending order. 388 (lang_one_common): Likewise. 389 * lexsup.c (ld_options): Have --sort-common take an option 390 argument. 391 (parse_args): Handle argument to --sort-common. 392 * ld.texinfo (--sort-common): Document new optional argument. 393 * NEWS: Mention new feature. 394 395 2008-05-28 Christophe Lyon <christophe.lyon@st.com> 396 397 * ld.texinfo: State that farcalls stubs are supported for ARM-EABI 398 only. 399 400 2008-05-27 Kai Tietz <kai.tietz@onevision.com> 401 402 * pe-dll.c (fill_edata): Make sure we calculate vma's in 403 type bfd_vma. 404 (generate_reloc): Likewise. 405 (pe_implied_import_dll): Likewise. 406 407 2008-05-21 Nick Clifton <nickc@redhat.com> 408 409 PR ld/6519 410 * ld.texinfo (Orphan Sections): Mention that the linker will 411 provide start and stop symbols for orphaned sections if their 412 names are valid C identifiers. 413 * NEWS: Add an addendum to the description of the linker feature 414 for providing orphan section start and end symbols. 415 416 2008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com> 417 418 * configure.in (--enable-got): New option. Handle it. 419 * configure: Regenerate. 420 * config.in: Regenerate. 421 * emultempl/m68kelf.em: (got_handling_target_default): New shell 422 variable. 423 (GOT_HANDLING_TARGET_DEFAULT): New macro. 424 (GOT_HANDLING_DEFAULT): New macro. Initialize it from configure 425 option if one was given. 426 (got_handling): New static variable. 427 (elf_m68k_create_output_section_statements): New static function 428 implementing hook. 429 (PARSE_AND_LIST_PROLOGUE): Define shell variable. 430 (OPTION_GOT): New macro. 431 (PARSE_AND_LIST_LONGOPTS): Define shell variable. Specify 432 --got option. 433 (got): New linker option. 434 (PARSE_AND_LIST_OPTIONS): Define shell variable. Print help string 435 for --got option. 436 (PARSE_AND_LIST_ARGS_CASES): Define shell variable. Handle --got 437 option. 438 * ld.texinfo: Document --got=<type> option. 439 * gen-doc.texi: Add M68K. 440 * NEWS: Mention the new feature. 441 442 2008-05-21 Evandro Menezes <evandro@yahoo.com> 443 444 PR ld/6430 445 * ld.texinfo (--sort-common): Correct documentation to indicate 446 that sorting is performed by alignment, not size, biggest 447 alignment first. 448 449 2008-05-21 Christophe Lyon <christophe.lyon@st.com> 450 Nick Clifton <nickc@redhat.com> 451 452 * ld.texinfo (ARM): Document --stub-group-size=N option. 453 Move description of --pic-veneer option into the ARM section. 454 * NEWS: Mention the support for long function calls. 455 456 2008-05-15 Christophe Lyon <christophe.lyon@st.com> 457 458 * emultempl/armelf.em (build_section_lists): New function. 459 (stub_file): Define. 460 (need_laying_out): Define. 461 (group_size): Define. 462 (hook_stub_info): Define. 463 (hook_in_stub): New function. 464 (elf32_arm_add_stub_section): New function. 465 (gldarm_layout_sections_again): New function. 466 (gld${EMULATION_NAME}_finish): Replace arm_elf_finish(). Generate 467 stubs for long calls if needed. 468 (arm_elf_create_output_section_statements): create stub_file bfd. 469 (arm_for_each_input_file_wrapper): New function. 470 (arm_lang_for_each_input_file): New function. 471 (lang_for_each_input_file): Define. 472 (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_STUBGROUP_SIZE. 473 (PARSE_AND_LIST_LONGOPTS): Add option stub-group-size. 474 (PARSE_AND_LIST_OPTIONS): Add option stub-group-size. 475 (PARSE_AND_LIST_ARGS_CASES): Add OPTION_STUBGROUP_SIZE case. 476 (LDEMUL_FINISH): Update to gld${EMULATION_NAME}_finish. 477 * lang.c (print_input_statement): Skip if bfd has 478 BFD_LINKER_CREATED. 479 480 2008-05-14 Alan Modra <amodra@bigpond.net.au> 481 482 * Makefile.in: Regenerate. 483 484 2008-05-09 Kai Tietz <kai.tietz@onevision.com> 485 486 ld/PR6502 487 * emultempl/pep.em (compute_dll_image_base): Use bfd_vma instead 488 of long and change return type to bfd_vma. 489 (definfo): Change type of address from long to bfd_vma. 490 (set_pep_value): Replace strtoul to strtoull. 491 (gld_${EMULATION_NAME}_set_symbols): use bfd_vma instead of long.. 492 * pe-dll.c (pe_dll_generate_def_file): Use fprintf_vma to print 493 ImageBase. 494 (quick_reloc): Change argument address from int to bfd_size_type. 495 496 2008-05-08 Tom Tromey <tromey@redhat.com> 497 498 * ld.texinfo (PowerPC64 ELF64): Fix typo. 499 500 2008-05-08 Alan Modra <amodra@bigpond.net.au> 501 502 * elf32_spu.sh (OTHER_SECTIONS): Add "._ea". 503 * elf32ppc.sh: If building with spu support, put ".data.spehandle" 504 sections at the start of ".data" and provide a symbol to locate 505 the directory of embedded spe programs. 506 507 2008-05-08 Alan Modra <amodra@bigpond.net.au> 508 509 * ldexp.c (exp_print_token): Add ABSOLUTE, MIN_K, ASSERT_K. Correct 510 MAX_K. 511 (fold_binary <SEGMENT_START>): Set expld.result.section to 512 current section. Expand comment. Formatting. 513 (fold_name <DEFINED>): Set expld.result.section to current section. 514 515 2008-04-28 Nathan Sidwell <nathan@codesourcery.com> 516 517 * ldlang.c (lang_size_sections_1): Don't check LMA overflow on 518 non-load sections. 519 520 2008-04-25 Michael Frysinger <vapier@gentoo.org> 521 522 * configure.tgt (bfin-*-linux-uclibc*): Set targ_emul to elf32bfinfd 523 and targ_extra_emuls to elf32bfin. 524 525 2008-04-23 Paolo Bonzini <bonzini@gnu.org> 526 527 * aclocal.m4: Regenerate. 528 * configure: Regenerate. 529 530 2008-04-03 Kai Tietz <kai.tietz@onevision.com> 531 532 * scripttempl/pep.sc: Align start of symbol __CTOR_LIST__. 533 534 2008-04-08 Alan Modra <amodra@bigpond.net.au> 535 536 * po/POTFILES.in: Regenerate. 537 538 2008-04-08 Alan Modra <amodra@bigpond.net.au> 539 540 * emultempl/spuelf.em (auto_overlay, auto_overlay_file, 541 auto_overlay_fixed, auto_overlay_reserved, my_argc, my_argv): New vars. 542 (spu_before_allocation): Warn on --auto-overlay and existing overlays. 543 (struct tflist, clean_tmp): Move. 544 (new_tmp_file): New function, extracted from.. 545 (embedded_spu_file): ..here. 546 (spu_elf_open_overlay_script, spu_elf_relink): New function. 547 (gld${EMULATION_NAME}_finish): Pass a bunch of --auto-overlay params. 548 Warn on --auto-overlay and zero local store. 549 (gld${EMULATION_NAME}_choose_target): New function to stash argv. 550 (OPTION_SPU_AUTO_OVERLAY, OPTION_SPU_AUTO_RELINK, 551 OPTION_SPU_OVERLAY_RODATA, OPTION_SPU_FIXED_SPACE, 552 OPTION_SPU_RESERVED_SPACE, OPTION_SPU_NO_AUTO_OVERLAY): Define. 553 (PARSE_AND_LIST_LONGOPTS): Add entries for new options. 554 (PARSE_AND_LIST_OPTIONS): Likewise. 555 (PARSE_AND_LIST_ARGS_CASES): Likewise. 556 (LDEMUL_CHOOSE_TARGET): Define. 557 558 2008-04-03 Kai Tietz <kai.tietz@onevision.com> 559 560 PR ld/6026 561 * pe-dll.c (make_head): Fix iat and thunk addend offset. 562 563 2008-03-31 Nick Clifton <nickc@redhat.com> 564 565 * po/fr.po: Updated French translation. 566 567 2008-03-24 Ian Lance Taylor <iant@google.com> 568 569 The sha1 code is now in libiberty. 570 * sha1.c: Remove. 571 * sha1.h: Remove. 572 * Makefile.am (CFILES): Remove sha1.c. 573 (HFILES): Remove sha1.h. 574 (OFILES): Remove sha1.o. 575 (ld_new_SOURCES): Remove sha1.c. 576 (sha1.o): Remove target. 577 * Makefile.in: Rebuild. 578 579 2008-03-20 Alan Modra <amodra@bigpond.net.au> 580 581 * emultempl/spuelf.em: Update calls to elf32-spu.c funcs. 582 583 2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 584 585 * aclocal.m4: Regenerate. 586 * configure: Likewise. 587 * Makefile.in: Likewise. 588 589 2008-03-14 Alan Modra <amodra@bigpond.net.au> 590 591 * emultempl/spuelf.em (gld${EMULATION_NAME}_finish): Protect 592 spu_elf_build_stubs with is_spu_target. 593 594 2008-03-13 Alan Modra <amodra@bigpond.net.au> 595 596 * Makefile.am: Run "make dep-am". 597 * Makefile.in: Regenerate. 598 * configure: Regenerate. 599 600 2008-03-06 Joseph Myers <joseph@codesourcery.com> 601 Roman Zippel <zippel@linux-m68k.org> 602 603 * emulparams/m68kelf.sh (GENERATE_PIE_SCRIPT): Define. 604 (COMMONPAGESIZE): Define. 605 606 2008-02-22 Nick Clifton <nickc@redhat.com> 607 608 PR ld/5785 609 * ldlang.c (lang_size_sections_1): Honour the setting of an 610 lma_region even if there is no vma region set, or the vma region 611 is the same as the lma region. 612 613 2008-02-18 Nick Clifton <nickc@redhat.com> 614 615 * scripttempl/armbpabi.sc (ENTRY): Do not define when performing a 616 relocatable link. 617 * scripttempl/elf32cr16.sc: Likewise. 618 * scripttempl/elf32cr16c.sc: Likewise. 619 * scripttempl/elf32crx.sc: Likewise. 620 * scripttempl/elf32sh-symbian.sc: Likewise. 621 * scripttempl/elf_chaos.sc: Likewise. 622 * scripttempl/elfd10v.sc: Likewise. 623 * scripttempl/elfi370.sc: Likewise. 624 * scripttempl/elfm68hc11.sc: Likewise. 625 * scripttempl/elfm68hc12.sc: Likewise. 626 * scripttempl/ip2k.sc: Likewise. 627 * scripttempl/iq2000.sc: Likewise. 628 * scripttempl/mep.sc: Likewise. 629 * scripttempl/v850.sc: Likewise. 630 * scripttempl/xstormy16.sc: Likewise. 631 632 2008-02-16 Alan Modra <amodra@bigpond.net.au> 633 634 PR ld/5761 635 * ldexp.c (fold_name <LOADADDR>): Check result of evaluating 636 load_base before calling make_abs. 637 638 2008-02-15 Alan Modra <amodra@bigpond.net.au> 639 640 * emultempl/alphaelf.em (alpha_after_open): Use elf_object_id. 641 * emultempl/hppaelf.em (hppaelf_create_output_section_statements): 642 Likewise. 643 * emultempl/ppc64elf.em (ppc_create_output_section_statements): 644 Likewise. 645 * emultempl/ppc32elf.em (is_ppc_elf32_vec): Delete. Replace all 646 uses with.. 647 (is_ppc_elf): ..this new macro. 648 649 2008-02-15 Alan Modra <amodra@bigpond.net.au> 650 651 * ldmain.h (output_bfd): Delete. 652 * ldmain.c (output_bfd): Delete. 653 Replace all occurrences of output_bfd with link_info.output_bfd. 654 * ldcref.c: Likewise. 655 * ldctor.c: Likewise. 656 * ldemul.c: Likewise. 657 * ldexp.c: Likewise. 658 * ldfile.c: Likewise. 659 * ldlang.c: Likewise. 660 * ldmisc.c: Likewise. 661 * ldwrite.c: Likewise. 662 * pe-dll.c: Likewise. 663 * emultempl/aix.em: Likewise. 664 * emultempl/alphaelf.em: Likewise. 665 * emultempl/armcoff.em: Likewise. 666 * emultempl/armelf.em: Likewise. 667 * emultempl/avrelf.em: Likewise. 668 * emultempl/beos.em: Likewise. 669 * emultempl/elf-generic.em: Likewise. 670 * emultempl/elf32.em: Likewise. 671 * emultempl/gld960.em: Likewise. 672 * emultempl/hppaelf.em: Likewise. 673 * emultempl/irix.em: Likewise. 674 * emultempl/linux.em: Likewise. 675 * emultempl/lnk960.em: Likewise. 676 * emultempl/m68hc1xelf.em: Likewise. 677 * emultempl/mmix-elfnmmo.em: Likewise. 678 * emultempl/mmo.em: Likewise. 679 * emultempl/pe.em: Likewise. 680 * emultempl/pep.em: Likewise. 681 * emultempl/ppc32elf.em: Likewise. 682 * emultempl/ppc64elf.em: Likewise. 683 * emultempl/scoreelf.em: Likewise. 684 * emultempl/sh64elf.em: Likewise. 685 * emultempl/spuelf.em: Likewise. 686 * emultempl/sunos.em: Likewise. 687 * emultempl/vanilla.em: Likewise. 688 * emultempl/vxworks.em: Likewise. 689 * emultempl/xtensaelf.em: Likewise. 690 * emultempl/z80.em: Likewise. 691 * ldlang.c (open_output): Don't return output, instead write 692 link_info_output_bfd directly. 693 * emultempl/alphaelf.em: Replace occurrences of link_info.hash->creator 694 with link_info.output_bfd->xvec. 695 * emultempl/hppaelf.em: Likewise. 696 * emultempl/ppc32elf.em: Likewise. 697 * emultempl/ppc64elf.em: Likewise. 698 * emultempl/spuelf.em: Likewise. 699 700 2008-02-07 Alan Modra <amodra@bigpond.net.au> 701 702 * ldlang.c (new_afile): Don't pass unadorned NULL to concat. 703 * ldfile.c (ldfile_add_library_path): Likewise. 704 * emultempl/elf32.em (check_ld_elf_hints, check_ld_so_conf): Likewise. 705 * emultempl/lnk960.em (lnk960_before_parse): Likewise. 706 * emultempl/spuelf.em (embedded_spu_file): Likewise. 707 708 2008-02-07 Alan Modra <amodra@bigpond.net.au> 709 710 * emultempl/spu_ovl.S: Use low bit of _ovly_table.size as 711 a "present" bit rather than low bit of .buf. Correct indexing 712 into _ovly_buf_table. Use relative loads and stores to access 713 overlay manager local vars. 714 * emultempl/spu_ovl.o: Regenerate. 715 716 2008-02-04 H.J. Lu <hongjiu.lu@intel.com> 717 718 PR 5715 719 * configure: Regenerated. 720 721 2008-01-31 Marc Gauthier <marc@tensilica.com> 722 723 * configure.tgt (xtensa*-*-*): Recognize processor variants. 724 725 2008-01-28 Fabian Groffen <grobian@gentoo.org> 726 727 * configure.tgt (x86_64-*-solaris2): Add support for this target. 728 729 2008-01-28 Vincent Riviere <vincent.riviere@freesbee.fr> 730 731 PR ld/5652 732 * genscripts.sh: Check for the existence of BASH_LINENO not just 733 the BASH shell before generating line numbers in the emulation 734 file. 735 736 2008-01-28 Alan Modra <amodra@bigpond.net.au> 737 738 * emultempl/spu_ovl.S: Rewrite. 739 * emultempl/spu_ovl.o: Regenerate. 740 * emultempl/spuelf.em (toe): Delete. 741 (spu_place_special_section): Add param to control section placement. 742 Adjust callers. 743 (spu_elf_load_ovl_mgr): Adjust for struct _spu_elf_section_data 744 changes. 745 (spu_before_allocation): Adjust spu_elf_size_stubs call. 746 (gld${EMULATION_NAME}_finish): Adjust spu_elf_build_stubs call. 747 748 2008-01-25 H.J. Lu <hongjiu.lu@intel.com> 749 750 PR ld/5670 751 * ldlang.c (process_insert_statements): Silence gcc 4.1 alias 752 warning. 753 754 2008-01-25 Alan Modra <amodra@bigpond.net.au> 755 756 * ld.texinfo (INSERT): Describe. 757 * ldgram.y (ldgram_in_script, ldgram_had_equals): Delete. 758 (INSERT_K, AFTER, BEFORE): Add as tokens. 759 (ifile_p1): Handle INSERT statements. 760 (saved_script_handle, force_make_executable): Move to.. 761 * ldmain.c: ..here. 762 (previous_script_handle): New global var. 763 * ldmain.h (saved_script_handle, force_make_executable): Declare. 764 (previous_script_handle): Likewise. 765 * ldlex.l (INSERT_K, AFTER, BEFORE): Add tokens. 766 * lexsup.c (parge_args <-T>): Set previous_script_handle. 767 * ldlang.c (lang_for_each_statement_worker): Handle insert statement. 768 (map_input_to_output_sections, print_statement): Likewise. 769 (lang_size_sections_1, lang_do_assignments_1): Likewise. 770 (insert_os_after): New function, extracted from.. 771 (lang_insert_orphan): ..here. 772 (process_insert_statements): New function. 773 (lang_process): Call it. 774 (lang_add_insert): New function. 775 * ldlang.h (lang_insert_statement_enum): New. 776 (lang_insert_statement_type): New. 777 (lang_statement_union_type): Add insert_statement. 778 (lang_add_insert): Declare. 779 780 2008-01-18 Bob Wilson <bob.wilson@acm.org> 781 782 * scripttempl/elfxtensa.sc: Merge ENTRY and .note.gnu.build-id 783 changes from elf.sc. 784 785 2008-01-16 Alan Modra <amodra@bigpond.net.au> 786 787 * ldlang.c (lang_size_sections_1): Simplify SEC_NEVER_LOAD test. 788 789 2008-01-16 Alan Modra <amodra@bigpond.net.au> 790 791 * ldlang.h (lang_afile_asection_pair_statement_enum): Delete. 792 (lang_afile_asection_pair_statement_type): Delete. 793 (lang_statement_union_type): Delete afile_asection_pair_statement. 794 * ldlang.c (lang_insert_orphan): Delete case handling the above. 795 (map_input_to_output_sections, print_statement): Likewise. 796 797 2008-01-15 Kaz Kojima <kkojima@rr.iij4u.or.jp> 798 799 * emulparams/shlelf_linux.sh (DATA_START_SYMBOLS): Use PROVIDE 800 with __data_start. 801 * emulparams/shelf_nbsd.sh (DATA_START_SYMBOLS): Likewise. 802 803 2008-01-15 Alan Modra <amodra@bigpond.net.au> 804 805 PR 5604 806 * ldlang.c (lang_gc_sections): Move code to set SEC_KEEP on entry 807 syms to _bfd_elf_gc_keep. 808 * emultempl/ppc64elf.em (ppc_before_allocation): Don't call 809 ppc64_elf_edit_opd if no_opd_opt. 810 811 2008-01-11 Tristan Gingold <gingold@adacore.com> 812 Eric Botcazou <ebotcazou@adacore.com> 813 814 * ldlang.c (lang_end): Warns if the entry point is not found when 815 --gc-sections. 816 Emit an error if no root is specified when --gc-sections -r. 817 * ld.texinfo (Options): Document that --gc-sections is compatible 818 with -r and -q. 819 * ldmain.c (main): Do not error out if -r and --gc-sections. 820 * scripttempl/elf.sc: Emit ENTRY command only if relocating. 821 822 2008-01-10 Daniel Jacobowitz <drow@sources.redhat.com> 823 824 PR ld/5533 825 * ldlang.c (lang_end): Issue a warning for a missing start symbol 826 of a shared library if the symbol was specified on the command 827 line. 828 829 2008-01-10 Alan Modra <amodra@bigpond.net.au> 830 831 * ld.texinfo (--gc-sections): Describe linker behaviour. 832 833 For older changes see ChangeLog-2007 834 0 835 836 Local Variables: 837 mode: change-log 838 left-margin: 8 839 fill-column: 74 840 version-control: never -
ld/Makefile.am
+End: diff -Naur binutils-2.19.orig/ld/Makefile.am binutils-2.19/ld/Makefile.am
old new 758 758 $(srcdir)/emultempl/spu_ovl.o_c: @MAINT@ $(srcdir)/emultempl/spu_ovl.S 759 759 if ../gas/as-new --version \ 760 760 | grep 'target.*spu' >/dev/null 2>/dev/null; then \ 761 cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s 761 cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s; \ 762 762 ../gas/as-new -o spu_ovl.o spu_ovl.s; \ 763 ../binutils/bin2c <spu_ovl.o >$@ 763 ../binutils/bin2c <spu_ovl.o >$@; \ 764 764 fi 765 765 eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \ 766 766 $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} … … 1914 1914 1915 1915 # Stuff that should be included in a distribution. The diststuff 1916 1916 # target is run by the taz target in ../Makefile.in. 1917 EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o_c $(man_MANS) 1917 EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o_c \ 1918 deffilep.c deffilep.h $(man_MANS) 1918 1919 diststuff: info $(EXTRA_DIST) 1919 1920 all: info ld.1 1920 1921 -
ld/Makefile.in
diff -Naur binutils-2.19.orig/ld/Makefile.in binutils-2.19/ld/Makefile.in
old new 730 730 731 731 # Stuff that should be included in a distribution. The diststuff 732 732 # target is run by the taz target in ../Makefile.in. 733 EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o_c $(man_MANS) 733 EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o_c \ 734 deffilep.c deffilep.h $(man_MANS) 735 734 736 DISTCLEANFILES = tdirs site.exp site.bak stringify.sed $(am__append_1) 735 737 all: config.h 736 738 $(MAKE) $(AM_MAKEFLAGS) all-recursive … … 1588 1590 $(srcdir)/emultempl/spu_ovl.o_c: @MAINT@ $(srcdir)/emultempl/spu_ovl.S 1589 1591 if ../gas/as-new --version \ 1590 1592 | grep 'target.*spu' >/dev/null 2>/dev/null; then \ 1591 cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s 1593 cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s; \ 1592 1594 ../gas/as-new -o spu_ovl.o spu_ovl.s; \ 1593 ../binutils/bin2c <spu_ovl.o >$@ 1595 ../binutils/bin2c <spu_ovl.o >$@; \ 1594 1596 fi 1595 1597 eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \ 1596 1598 $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -
binutils-2.19
diff -Naur binutils-2.19.orig/ld/pe-dll.c binutils-2.19/ld/pe-dll.c
old new 1 1 /* Routines to help build PEI-format DLLs (Win32 etc) 2 2 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 3 2008 Free Software Foundation, Inc.3 2008, 2009 Free Software Foundation, Inc. 4 4 Written by DJ Delorie <dj@cygnus.com> 5 5 6 6 This file is part of the GNU Binutils. … … 314 314 { STRING_COMMA_LEN ("libcegcc") }, 315 315 { STRING_COMMA_LEN ("libcygwin") }, 316 316 { STRING_COMMA_LEN ("libgcc") }, 317 { STRING_COMMA_LEN ("libgcc_s") }, 317 318 { STRING_COMMA_LEN ("libstdc++") }, 318 319 { STRING_COMMA_LEN ("libmingw32") }, 319 320 { STRING_COMMA_LEN ("libmingwex") }, … … 324 325 { NULL, 0 } 325 326 }; 326 327 328 /* Regardless of the suffix issue mentioned above, we must ensure that 329 we do not falsely match on a leading substring, such as when libtool 330 builds libstdc++ as a DLL using libsupc++convenience.a as an intermediate. 331 This routine ensures that the leading part of the name matches and that 332 it is followed by only an optional version suffix and a file extension, 333 returning zero if so or -1 if not. */ 334 static int libnamencmp (const char *libname, const autofilter_entry_type *afptr) 335 { 336 if (strncmp (libname, afptr->name, afptr->len)) 337 return -1; 338 339 libname += afptr->len; 340 341 /* Be liberal in interpreting what counts as a version suffix; we 342 accept anything that has a dash to separate it from the name and 343 begins with a digit. */ 344 if (libname[0] == '-') 345 { 346 if (!ISDIGIT (*++libname)) 347 return -1; 348 /* Ensure the filename has an extension. */ 349 while (*++libname != '.') 350 if (!*libname) 351 return -1; 352 } 353 else if (libname[0] != '.') 354 return -1; 355 356 return 0; 357 } 358 327 359 static const autofilter_entry_type autofilter_objlist[] = 328 360 { 329 361 { STRING_COMMA_LEN ("crt0.o") }, … … 501 533 502 534 while (afptr->name) 503 535 { 504 if ( strncmp (libname, afptr->name, afptr->len) == 0 )536 if (libnamencmp (libname, afptr) == 0 ) 505 537 return 0; 506 538 afptr++; 507 539 } -
ld/testsuite/ChangeLog
diff -Naur binutils-2.19.orig/ld/testsuite/ChangeLog binutils-2.19/ld/testsuite/ChangeLog
old new 1 2009-01-14 Joseph Myers <joseph@codesourcery.com> 2 3 * ld-arm/thumb2-bl-undefweak.d, ld-arm/thumb2-bl-undefweak.s: New. 4 * ld-arm/arm-elf.exp: Run thumb2-bl-undefweak test. 5 1 6 2008-09-30 Alan Modra <amodra@bigpond.net.au> 2 7 3 8 * ld-elf/extract-symbol-1sec.d: Correct section lma. -
ld/testsuite/ld-arm/arm-elf.exp
diff -Naur binutils-2.19.orig/ld/testsuite/ld-arm/arm-elf.exp binutils-2.19/ld/testsuite/ld-arm/arm-elf.exp
old new 184 184 run_dump_test "group-relocs-ldr-bad" 185 185 run_dump_test "group-relocs-ldrs-bad" 186 186 run_dump_test "group-relocs-ldc-bad" 187 run_dump_test "thumb2-bl-undefweak" 187 188 run_dump_test "emit-relocs1" 188 189 189 190 # Exclude non-ARM-EABI targets. -
opcodes/ChangeLog
diff -Naur binutils-2.19.orig/opcodes/ChangeLog binutils-2.19/opcodes/ChangeLog
old new 1 2008-11-27 Alan Modra <amodra@bigpond.net.au> 2 3 * ppc-opc.c (extract_sprg): Correct operand range check. 4 5 2008-11-26 Andreas Schwab <schwab@suse.de> 6 7 * m68k-dis.c (NEXTBYTE, NEXTWORD, NEXTLONG, NEXTULONG, NEXTSINGLE) 8 (NEXTDOUBLE, NEXTEXTEND, NEXTPACKED): Fix error handling. 9 (save_printer, save_print_address): Remove. 10 (fetch_data): Don't use them. 11 (match_insn_m68k): Always restore printing functions. 12 (print_insn_m68k): Don't save/restore printing functions. 13 14 2008-11-25 Nick Clifton <nickc@redhat.com> 15 16 * m68k-dis.c: Rewrite to remove use of setjmp/longjmp. 17 1 18 2008-09-29 Nick Clifton <nickc@redhat.com> 2 19 3 20 * po/vi.po: Updated Vietnamese translation. -
opcodes/m68k-dis.c
diff -Naur binutils-2.19.orig/opcodes/m68k-dis.c binutils-2.19/opcodes/m68k-dis.c
old new 60 60 #endif 61 61 62 62 /* Get a 1 byte signed integer. */ 63 #define NEXTBYTE(p) (p += 2, FETCH_DATA (info, p), COERCE_SIGNED_CHAR(p[-1])) 63 #define NEXTBYTE(p, val) \ 64 do \ 65 { \ 66 p += 2; \ 67 if (!FETCH_DATA (info, p)) \ 68 return -3; \ 69 val = COERCE_SIGNED_CHAR (p[-1]); \ 70 } \ 71 while (0) 64 72 65 73 /* Get a 2 byte signed integer. */ 66 74 #define COERCE16(x) ((int) (((x) ^ 0x8000) - 0x8000)) 67 #define NEXTWORD(p) \ 68 (p += 2, FETCH_DATA (info, p), \ 69 COERCE16 ((p[-2] << 8) + p[-1])) 75 76 #define NEXTWORD(p, val, ret_val) \ 77 do \ 78 { \ 79 p += 2; \ 80 if (!FETCH_DATA (info, p)) \ 81 return ret_val; \ 82 val = COERCE16 ((p[-2] << 8) + p[-1]); \ 83 } \ 84 while (0) 70 85 71 86 /* Get a 4 byte signed integer. */ 72 87 #define COERCE32(x) ((bfd_signed_vma) ((x) ^ 0x80000000) - 0x80000000) 73 #define NEXTLONG(p) \ 74 (p += 4, FETCH_DATA (info, p), \ 75 (COERCE32 ((((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1]))) 88 89 #define NEXTLONG(p, val, ret_val) \ 90 do \ 91 { \ 92 p += 4; \ 93 if (!FETCH_DATA (info, p)) \ 94 return ret_val; \ 95 val = COERCE32 ((((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1]); \ 96 } \ 97 while (0) 76 98 77 99 /* Get a 4 byte unsigned integer. */ 78 #define NEXTULONG(p) \ 79 (p += 4, FETCH_DATA (info, p), \ 80 (unsigned int) ((((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1])) 100 #define NEXTULONG(p, val) \ 101 do \ 102 { \ 103 p += 4; \ 104 if (!FETCH_DATA (info, p)) \ 105 return -3; \ 106 val = (unsigned int) ((((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1]); \ 107 } \ 108 while (0) 81 109 82 110 /* Get a single precision float. */ 83 #define NEXTSINGLE(val, p) \ 84 (p += 4, FETCH_DATA (info, p), \ 85 floatformat_to_double (&floatformat_ieee_single_big, (char *) p - 4, &val)) 111 #define NEXTSINGLE(val, p) \ 112 do \ 113 { \ 114 p += 4; \ 115 if (!FETCH_DATA (info, p)) \ 116 return -3; \ 117 floatformat_to_double (& floatformat_ieee_single_big, \ 118 (char *) p - 4, & val); \ 119 } \ 120 while (0) 86 121 87 122 /* Get a double precision float. */ 88 #define NEXTDOUBLE(val, p) \ 89 (p += 8, FETCH_DATA (info, p), \ 90 floatformat_to_double (&floatformat_ieee_double_big, (char *) p - 8, &val)) 123 #define NEXTDOUBLE(val, p) \ 124 do \ 125 { \ 126 p += 8; \ 127 if (!FETCH_DATA (info, p)) \ 128 return -3; \ 129 floatformat_to_double (& floatformat_ieee_double_big, \ 130 (char *) p - 8, & val); \ 131 } \ 132 while (0) 91 133 92 134 /* Get an extended precision float. */ 93 #define NEXTEXTEND(val, p) \ 94 (p += 12, FETCH_DATA (info, p), \ 95 floatformat_to_double (&floatformat_m68881_ext, (char *) p - 12, &val)) 135 #define NEXTEXTEND(val, p) \ 136 do \ 137 { \ 138 p += 12; \ 139 if (!FETCH_DATA (info, p)) \ 140 return -3; \ 141 floatformat_to_double (& floatformat_m68881_ext, \ 142 (char *) p - 12, & val); \ 143 } \ 144 while (0) 96 145 97 146 /* Need a function to convert from packed to double 98 147 precision. Actually, it's easier to print a 99 148 packed number than a double anyway, so maybe 100 149 there should be a special case to handle this... */ 101 #define NEXTPACKED(p) \ 102 (p += 12, FETCH_DATA (info, p), 0.0) 150 #define NEXTPACKED(p, val) \ 151 do \ 152 { \ 153 p += 12; \ 154 if (!FETCH_DATA (info, p)) \ 155 return -3; \ 156 val = 0.0; \ 157 } \ 158 while (0) 159 103 160 104 161 105 162 /* Maximum length of an instruction. */ -
opcodes/ppc-opc.c
#define MAXLEN 22 @@ -112,12 +169,10 @@ bfd_byte *max_fetched; bfd_byte the_buffer[MAXLEN]; bfd_vma insn_start; - jmp_buf bailout; }; /* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive) - to ADDR (exclusive) are valid. Returns 1 for success, longjmps - on error. */ + to ADDR (exclusive) are valid. Returns 1 for success, 0 on error. */ #define FETCH_DATA(info, addr) \ ((addr) <= ((struct private *) (info->private_data))->max_fetched \ ? 1 : fetch_data ((info), (addr))) @@ -136,7 +191,7 @@ if (status != 0) { (*info->memory_error_func) (status, start, info); - longjmp (priv->bailout, 1); + return 0; } else priv->max_fetched = addr; @@ -161,7 +216,8 @@ /* Fetch BITS bits from a position in the instruction specified by CODE. CODE is a "place to put an argument", or 'x' for a destination that is a general address (mode and register). - BUFFER contains the instruction. */ + BUFFER contains the instruction. + Returns -1 on failure. */ static int fetch_arg (unsigned char *buffer, @@ -216,64 +272,75 @@ break; case 'k': - FETCH_DATA (info, buffer + 3); + if (! FETCH_DATA (info, buffer + 3)) + return -1; val = (buffer[3] >> 4); break; case 'C': - FETCH_DATA (info, buffer + 3); + if (! FETCH_DATA (info, buffer + 3)) + return -1; val = buffer[3]; break; case '1': - FETCH_DATA (info, buffer + 3); + if (! FETCH_DATA (info, buffer + 3)) + return -1; val = (buffer[2] << 8) + buffer[3]; val >>= 12; break; case '2': - FETCH_DATA (info, buffer + 3); + if (! FETCH_DATA (info, buffer + 3)) + return -1; val = (buffer[2] << 8) + buffer[3]; val >>= 6; break; case '3': case 'j': - FETCH_DATA (info, buffer + 3); + if (! FETCH_DATA (info, buffer + 3)) + return -1; val = (buffer[2] << 8) + buffer[3]; break; case '4': - FETCH_DATA (info, buffer + 5); + if (! FETCH_DATA (info, buffer + 5)) + return -1; val = (buffer[4] << 8) + buffer[5]; val >>= 12; break; case '5': - FETCH_DATA (info, buffer + 5); + if (! FETCH_DATA (info, buffer + 5)) + return -1; val = (buffer[4] << 8) + buffer[5]; val >>= 6; break; case '6': - FETCH_DATA (info, buffer + 5); + if (! FETCH_DATA (info, buffer + 5)) + return -1; val = (buffer[4] << 8) + buffer[5]; break; case '7': - FETCH_DATA (info, buffer + 3); + if (! FETCH_DATA (info, buffer + 3)) + return -1; val = (buffer[2] << 8) + buffer[3]; val >>= 7; break; case '8': - FETCH_DATA (info, buffer + 3); + if (! FETCH_DATA (info, buffer + 3)) + return -1; val = (buffer[2] << 8) + buffer[3]; val >>= 10; break; case '9': - FETCH_DATA (info, buffer + 3); + if (! FETCH_DATA (info, buffer + 3)) + return -1; val = (buffer[2] << 8) + buffer[3]; val >>= 5; break; @@ -283,7 +350,8 @@ break; case 'E': - FETCH_DATA (info, buffer + 3); + if (! FETCH_DATA (info, buffer + 3)) + return -1; val = (buffer[2] >> 1); break; @@ -450,7 +518,8 @@ /* Print an indexed argument. The base register is BASEREG (-1 for pc). P points to extension word, in buffer. - ADDR is the nominal core address of that extension word. */ + ADDR is the nominal core address of that extension word. + Returns NULL upon error. */ static unsigned char * print_indexed (int basereg, @@ -465,7 +534,7 @@ char buf[40]; char vmabuf[50]; - word = NEXTWORD (p); + NEXTWORD (p, word, NULL); /* Generate the text for the index register. Where this will be output is not yet determined. */ @@ -503,10 +572,10 @@ switch ((word >> 4) & 3) { case 2: - base_disp = NEXTWORD (p); + NEXTWORD (p, base_disp, NULL); break; case 3: - base_disp = NEXTLONG (p); + NEXTLONG (p, base_disp, NULL); } if (basereg == -1) base_disp += addr; @@ -526,10 +595,10 @@ switch (word & 3) { case 2: - outer_disp = NEXTWORD (p); + NEXTWORD (p, outer_disp, NULL); break; case 3: - outer_disp = NEXTLONG (p); + NEXTLONG (p, outer_disp, NULL); } print_base (basereg, base_disp, info); @@ -547,9 +616,18 @@ return p; } +#define FETCH_ARG(size, val) \ + do \ + { \ + val = fetch_arg (buffer, place, size, info); \ + if (val < 0) \ + return -3; \ + } \ + while (0) + /* Returns number of bytes "eaten" by the operand, or return -1 if an invalid operand was found, or -2 if - an opcode tabe error was found. + an opcode tabe error was found or -3 to simply abort. ADDR is the pc for this arg to be relative to. */ static int @@ -575,23 +653,21 @@ case 'c': /* Cache identifier. */ { static char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" }; - val = fetch_arg (buffer, place, 2, info); - (*info->fprintf_func) (info->stream, cacheFieldName[val]); + FETCH_ARG (2, val); + (*info->fprintf_func) (info->stream, cacheFieldName[val]); break; } case 'a': /* Address register indirect only. Cf. case '+'. */ { - (*info->fprintf_func) - (info->stream, - "%s@", - reg_names[fetch_arg (buffer, place, 3, info) + 8]); + FETCH_ARG (3, val); + (*info->fprintf_func) (info->stream, "%s@", reg_names[val + 8]); break; } case '_': /* 32-bit absolute address for move16. */ { - uval = NEXTULONG (p); + NEXTULONG (p, uval); (*info->print_address_func) (uval, info); break; } @@ -643,7 +719,7 @@ /* Fido added these. */ {"%cac", 0xffe}, {"%mbo", 0xfff}}; - val = fetch_arg (buffer, place, 12, info); + FETCH_ARG (12, val); for (regno = sizeof names / sizeof names[0] - 1; regno >= 0; regno--) if (names[regno].value == val) { @@ -656,7 +732,7 @@ break; case 'Q': - val = fetch_arg (buffer, place, 3, info); + FETCH_ARG (3, val); /* 0 means 8, except for the bkpt instruction... */ if (val == 0 && d[1] != 's') val = 8; @@ -664,7 +740,7 @@ break; case 'x': - val = fetch_arg (buffer, place, 3, info); + FETCH_ARG (3, val); /* 0 means -1. */ if (val == 0) val = -1; @@ -672,12 +748,12 @@ break; case 'j': - val = fetch_arg (buffer, place, 3, info); + FETCH_ARG (3, val); (*info->fprintf_func) (info->stream, "#%d", val+1); break; case 'K': - val = fetch_arg (buffer, place, 9, info); + FETCH_ARG (9, val); (*info->fprintf_func) (info->stream, "#%d", val); break; @@ -685,12 +761,13 @@ if (place == 'h') { static char *const scalefactor_name[] = { "<<", ">>" }; - val = fetch_arg (buffer, place, 1, info); + + FETCH_ARG (1, val); (*info->fprintf_func) (info->stream, scalefactor_name[val]); } else { - val = fetch_arg (buffer, place, 8, info); + FETCH_ARG (8, val); if (val & 0x80) val = val - 0x100; (*info->fprintf_func) (info->stream, "#%d", val); @@ -698,29 +775,27 @@ break; case 'T': - val = fetch_arg (buffer, place, 4, info); + FETCH_ARG (4, val); (*info->fprintf_func) (info->stream, "#%d", val); break; case 'D': - (*info->fprintf_func) (info->stream, "%s", - reg_names[fetch_arg (buffer, place, 3, info)]); + FETCH_ARG (3, val); + (*info->fprintf_func) (info->stream, "%s", reg_names[val]); break; case 'A': - (*info->fprintf_func) - (info->stream, "%s", - reg_names[fetch_arg (buffer, place, 3, info) + 010]); + FETCH_ARG (3, val); + (*info->fprintf_func) (info->stream, "%s", reg_names[val + 010]); break; case 'R': - (*info->fprintf_func) - (info->stream, "%s", - reg_names[fetch_arg (buffer, place, 4, info)]); + FETCH_ARG (4, val); + (*info->fprintf_func) (info->stream, "%s", reg_names[val]); break; case 'r': - regno = fetch_arg (buffer, place, 4, info); + FETCH_ARG (4, regno); if (regno > 7) (*info->fprintf_func) (info->stream, "%s@", reg_names[regno]); else @@ -728,13 +803,12 @@ break; case 'F': - (*info->fprintf_func) - (info->stream, "%%fp%d", - fetch_arg (buffer, place, 3, info)); + FETCH_ARG (3, val); + (*info->fprintf_func) (info->stream, "%%fp%d", val); break; case 'O': - val = fetch_arg (buffer, place, 6, info); + FETCH_ARG (6, val); if (val & 0x20) (*info->fprintf_func) (info->stream, "%s", reg_names[val & 7]); else @@ -742,78 +816,78 @@ break; case '+': - (*info->fprintf_func) - (info->stream, "%s@+", - reg_names[fetch_arg (buffer, place, 3, info) + 8]); + FETCH_ARG (3, val); + (*info->fprintf_func) (info->stream, "%s@+", reg_names[val + 8]); break; case '-': - (*info->fprintf_func) - (info->stream, "%s@-", - reg_names[fetch_arg (buffer, place, 3, info) + 8]); + FETCH_ARG (3, val); + (*info->fprintf_func) (info->stream, "%s@-", reg_names[val + 8]); break; case 'k': if (place == 'k') - (*info->fprintf_func) - (info->stream, "{%s}", - reg_names[fetch_arg (buffer, place, 3, info)]); + { + FETCH_ARG (3, val); + (*info->fprintf_func) (info->stream, "{%s}", reg_names[val]); + } else if (place == 'C') { - val = fetch_arg (buffer, place, 7, info); + FETCH_ARG (7, val); if (val > 63) /* This is a signed constant. */ val -= 128; (*info->fprintf_func) (info->stream, "{#%d}", val); } else - return -2; + return -1; break; case '#': case '^': p1 = buffer + (*d == '#' ? 2 : 4); if (place == 's') - val = fetch_arg (buffer, place, 4, info); + FETCH_ARG (4, val); else if (place == 'C') - val = fetch_arg (buffer, place, 7, info); + FETCH_ARG (7, val); else if (place == '8') - val = fetch_arg (buffer, place, 3, info); + FETCH_ARG (3, val); else if (place == '3') - val = fetch_arg (buffer, place, 8, info); + FETCH_ARG (8, val); else if (place == 'b') - val = NEXTBYTE (p1); + NEXTBYTE (p1, val); else if (place == 'w' || place == 'W') - val = NEXTWORD (p1); + NEXTWORD (p1, val, -3); else if (place == 'l') - val = NEXTLONG (p1); + NEXTLONG (p1, val, -3); else return -2; + (*info->fprintf_func) (info->stream, "#%d", val); break; case 'B': if (place == 'b') - disp = NEXTBYTE (p); + NEXTBYTE (p, disp); else if (place == 'B') disp = COERCE_SIGNED_CHAR (buffer[1]); else if (place == 'w' || place == 'W') - disp = NEXTWORD (p); + NEXTWORD (p, disp, -3); else if (place == 'l' || place == 'L' || place == 'C') - disp = NEXTLONG (p); + NEXTLONG (p, disp, -3); else if (place == 'g') { - disp = NEXTBYTE (buffer); + NEXTBYTE (buffer, disp); if (disp == 0) - disp = NEXTWORD (p); + NEXTWORD (p, disp, -3); else if (disp == -1) - disp = NEXTLONG (p); + NEXTLONG (p, disp, -3); } else if (place == 'c') { if (buffer[1] & 0x40) /* If bit six is one, long offset. */ - disp = NEXTLONG (p); + NEXTLONG (p, disp, -3); else - disp = NEXTWORD (p); + NEXTWORD (p, disp, -3); } else return -2; @@ -822,29 +896,32 @@ break; case 'd': - val = NEXTWORD (p); - (*info->fprintf_func) - (info->stream, "%s@(%d)", - reg_names[fetch_arg (buffer, place, 3, info) + 8], val); - break; + { + int val1; + + NEXTWORD (p, val, -3); + FETCH_ARG (3, val1); + (*info->fprintf_func) (info->stream, "%s@(%d)", reg_names[val1 + 8], val); + break; + } case 's': - (*info->fprintf_func) (info->stream, "%s", - fpcr_names[fetch_arg (buffer, place, 3, info)]); + FETCH_ARG (3, val); + (*info->fprintf_func) (info->stream, "%s", fpcr_names[val]); break; case 'e': - val = fetch_arg(buffer, place, 2, info); + FETCH_ARG (2, val); (*info->fprintf_func) (info->stream, "%%acc%d", val); break; case 'g': - val = fetch_arg(buffer, place, 1, info); - (*info->fprintf_func) (info->stream, "%%accext%s", val==0 ? "01" : "23"); + FETCH_ARG (1, val); + (*info->fprintf_func) (info->stream, "%%accext%s", val == 0 ? "01" : "23"); break; case 'i': - val = fetch_arg(buffer, place, 2, info); + FETCH_ARG (2, val); if (val == 1) (*info->fprintf_func) (info->stream, "<<"); else if (val == 3) @@ -856,7 +933,8 @@ case 'I': /* Get coprocessor ID... */ val = fetch_arg (buffer, 'd', 3, info); - + if (val < 0) + return -3; if (val != 1) /* Unusual coprocessor ID? */ (*info->fprintf_func) (info->stream, "(cpid=%d) ", val); break; @@ -888,10 +966,16 @@ if (place == 'd') { val = fetch_arg (buffer, 'x', 6, info); + if (val < 0) + return -3; val = ((val & 7) << 3) + ((val >> 3) & 7); } else - val = fetch_arg (buffer, 's', 6, info); + { + val = fetch_arg (buffer, 's', 6, info); + if (val < 0) + return -3; + } /* If the <ea> is invalid for *d, then reject this match. */ if (!m68k_valid_ea (*d, val)) @@ -923,29 +1007,31 @@ break; case 5: - val = NEXTWORD (p); + NEXTWORD (p, val, -3); (*info->fprintf_func) (info->stream, "%s@(%d)", regname, val); break; case 6: p = print_indexed (regno, p, addr, info); + if (p == NULL) + return -3; break; case 7: switch (val & 7) { case 0: - val = NEXTWORD (p); + NEXTWORD (p, val, -3); (*info->print_address_func) (val, info); break; case 1: - uval = NEXTULONG (p); + NEXTULONG (p, uval); (*info->print_address_func) (uval, info); break; case 2: - val = NEXTWORD (p); + NEXTWORD (p, val, -3); (*info->fprintf_func) (info->stream, "%%pc@("); (*info->print_address_func) (addr + val, info); (*info->fprintf_func) (info->stream, ")"); @@ -953,6 +1039,8 @@ case 3: p = print_indexed (-1, p, addr, info); + if (p == NULL) + return -3; break; case 4: @@ -960,17 +1048,17 @@ switch (place) { case 'b': - val = NEXTBYTE (p); + NEXTBYTE (p, val); flt_p = 0; break; case 'w': - val = NEXTWORD (p); + NEXTWORD (p, val, -3); flt_p = 0; break; case 'l': - val = NEXTLONG (p); + NEXTLONG (p, val, -3); flt_p = 0; break; @@ -987,7 +1075,7 @@ break; case 'p': - flval = NEXTPACKED (p); + NEXTPACKED (p, flval); break; default: @@ -1009,7 +1097,7 @@ mask bit and if set, add a '&' to the arg. */ if (place == '/') { - val = fetch_arg (buffer, place, 1, info); + FETCH_ARG (1, val); if (val) info->fprintf_func (info->stream, "&"); } @@ -1021,7 +1109,7 @@ { char doneany; p1 = buffer + 2; - val = NEXTWORD (p1); + NEXTWORD (p1, val, -3); /* Move the pointer ahead if this point is farther ahead than the last. */ p = p1 > p ? p1 : p; @@ -1062,7 +1150,8 @@ { /* `fmovem' insn. */ char doneany; - val = fetch_arg (buffer, place, 8, info); + + FETCH_ARG (8, val); if (val == 0) { (*info->fprintf_func) (info->stream, "#0"); @@ -1096,10 +1185,9 @@ } else if (place == '8') { + FETCH_ARG (3, val); /* fmoveml for FP status registers. */ - (*info->fprintf_func) (info->stream, "%s", - fpcr_names[fetch_arg (buffer, place, 3, - info)]); + (*info->fprintf_func) (info->stream, "%s", fpcr_names[val]); } else return -2; @@ -1115,9 +1203,10 @@ case '2': case '3': { - int val = fetch_arg (buffer, place, 5, info); + int val; char *name = 0; + FETCH_ARG (5, val); switch (val) { case 2: name = "%tt0"; break; @@ -1152,8 +1241,9 @@ case 'f': { - int fc = fetch_arg (buffer, place, 5, info); + int fc; + FETCH_ARG (5, fc); if (fc == 1) (*info->fprintf_func) (info->stream, "%%dfc"); else if (fc == 0) @@ -1170,8 +1260,9 @@ case 't': { - int level = fetch_arg (buffer, place, 3, info); + int level; + FETCH_ARG (3, level); (*info->fprintf_func) (info->stream, "%d", level); } break; @@ -1179,8 +1270,9 @@ case 'u': { short is_upper = 0; - int reg = fetch_arg (buffer, place, 5, info); + int reg; + FETCH_ARG (5, reg); if (reg & 0x10) { is_upper = 1; @@ -1303,7 +1395,7 @@ if (eaten >= 0) p += eaten; - else if (eaten == -1) + else if (eaten == -1 || eaten == -3) { info->fprintf_func = save_printer; info->print_address_func = save_print_address; @@ -1318,7 +1410,7 @@ info->fprintf_func (info->stream, /* xgettext:c-format */ _("<internal error in opcode table: %s %s>\n"), - best->name, best->args); + best->name, best->args); return 2; } } @@ -1439,6 +1531,8 @@ if (d[0] == 's' && d[1] == '8') { val = fetch_arg (buffer, d[1], 3, info); + if (val < 0) + return 0; if ((val & (val - 1)) != 0) break; } @@ -1479,13 +1573,7 @@ bfd_byte *buffer = priv.the_buffer; - /* Save these printing functions in case we need to restore them - later. */ - fprintf_ftype save_printer = info->fprintf_func; - void (* save_print_address) (bfd_vma, struct disassemble_info *) - = info->print_address_func; - - info->private_data = (PTR) &priv; + info->private_data = & priv; /* Tell objdump to use two bytes per chunk and six bytes per line for displaying raw data. */ info->bytes_per_chunk = 2; @@ -1494,49 +1582,23 @@ priv.max_fetched = priv.the_buffer; priv.insn_start = memaddr; - if (setjmp (priv.bailout) != 0) - { - /* longjmp may be called while these printing functions are - temporarily replaced with dummy functions. Restore them - before we leave. - - Admittedly, this save-and-restore operation is somewhat ugly - in that we are exposing the fact that match_insn_m68k - temporarily replaces insn->fprintf_func and - insn->print_address_func. Perhaps, a real fix is to report a - FETCH_DATA failure with a return value of some sort, without - using setjmp/longjmp. A better fix may be to teach the m68k - disassembler do its job without temporarily replacing - insn->fprintf_func and insn->print_address_func, but that's a - task for another day. */ - info->fprintf_func = save_printer; - info->print_address_func = save_print_address; - - /* Error return. */ - return -1; - } - arch_mask = bfd_m68k_mach_to_features (info->mach); if (!arch_mask) { /* First try printing an m680x0 instruction. Try printing a Coldfire one if that fails. */ val = m68k_scan_mask (memaddr, info, m68k_mask); - if (val) - return val; - - val = m68k_scan_mask (memaddr, info, mcf_mask); - if (val) - return val; + if (val == 0) + val = m68k_scan_mask (memaddr, info, mcf_mask); } else { val = m68k_scan_mask (memaddr, info, arch_mask); - if (val) - return val; } - /* Handle undefined instructions. */ - info->fprintf_func (info->stream, "0%o", (buffer[0] << 8) + buffer[1]); - return 2; + if (val == 0) + /* Handle undefined instructions. */ + info->fprintf_func (info->stream, "0%o", (buffer[0] << 8) + buffer[1]); + + return val ? val : 2; } diff -Naur binutils-2.19.orig/opcodes/ppc-opc.c binutils-2.19/opcodes/ppc-opc.c
old new 1281 1281 1282 1282 /* mfsprg can use 260..263 and 272..279. mtsprg only uses spr 272..279 1283 1283 If not BOOKE or 405, then both use only 272..275. */ 1284 if ( val <= 31285 || (val < 0x10&& (insn & 0x100) != 0)1286 || (val - 0x10 >31287 && (dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_403)) == 0))1284 if ((val - 0x10 > 3 && (dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_405)) == 0) 1285 || (val - 0x10 > 7 && (insn & 0x100) != 0) 1286 || val <= 3 1287 || (val & 8) != 0) 1288 1288 *invalid = 1; 1289 1289 return val & 7; 1290 1290 }
Note:
See TracBrowser
for help on using the repository browser.