Commit Graph

258 Commits

Author SHA1 Message Date
Jason Thorpe 225247f09f bfd:
* config.bfd (hppa*-*-netbsd*): Set targ_defvec to
bfd_elf32_hppa_nbsd_vec.  Add bfd_elf32_hppa_linux_vec
to targ_selvecs.
* configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
* configure: Regenerate.
* elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
case that accepts OSABI=NetBSD and OSABI=SysV.
(elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
the base of .got or .data (if .got does not exist).
(elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
set OSABI=NetBSD.
(TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
(TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
* targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
(_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.

gas:
* config/tc-hppa.h (TARGET_FORMAT): Set to "elf32-hppa-netbsd"
for TE_NetBSD.

ld:
* emulparams/hppanbsd.sh (OUTPUT_FORMAT): Set to "elf32-hppa-netbsd".
2004-07-27 22:30:25 +00:00
Nick Clifton c05e9f04ff Add new subtargets: msp430x1610, msp430x1611, msp430x1612, msp430x415,
msp430x417, msp430xG437, msp430xG438, msp430xG439.
2004-07-26 12:29:02 +00:00
Nick Clifton 1fe1f39c06 Add new port: crx-elf 2004-07-07 17:28:53 +00:00
Nick Clifton 85fbca6a4f Add support for sh-symbian-elf target 2004-07-06 16:58:43 +00:00
Dave Anglin b71a518155 * emulparams/hppa64linux.sh: Define PLT_BEFORE_GOT.
* emulparams/hppalinux.sh: Likewise.
	* scripttempl/elf.sc: Place .plt just before .got when .plt is in
	data segment and PLT_BEFORE_GOT is defined.
2004-07-05 20:00:13 +00:00
Kaz Kojima f6a8ae8136 * emulparams/shlelf32_linux.sh (COMMONPAGESIZE): Set to 4KB.
* ld-elf/frame.exp: Don't run on sh*-*-elf*.
	* ld-sh/shared-1.d: Adjust for section reordering changes.
	* ld-sh/shared-2.d: Likewise.
	* ld-sh/tlsbin-2.d: Likewise.
	* ld-sh/tlspic-2.d: Likewise.
	* ld-sh/sh64/abi32.xd: Likewise.
	* ld-sh/sh64/abi64.xd: Likewise.
	* ld-sh/sh64/cmpct1.xd: Likewise.
	* ld-sh/sh64/crange1.rd: Likewise.
	* ld-sh/sh64/crange2.rd: Likewise.
	* ld-sh/sh64/crange3-cmpct.rd: Likewise.
	* ld-sh/sh64/crange3-media.rd: Likewise.
	* ld-sh/sh64/crange3.rd: Likewise.
	* ld-sh/sh64/gotplt.d: Likewise.
	* ld-sh/sh64/init-cmpct.d: Likewise.
	* ld-sh/sh64/init-media.d: Likewise.
	* ld-sh/sh64/init64.d: Likewise.
	* ld-sh/sh64/mix1.xd: Likewise.
	* ld-sh/sh64/mix2.xd: Likewise.
	* ld-sh/sh64/shdl32.xd: Likewise.
	* ld-sh/sh64/shdl64.xd: Likewise.
2004-07-02 11:25:54 +00:00
Alexandre Oliva aee6f5b4bd bfd/ChangeLog:
* elf-bfd.h (struct elf_backend_data): Added
elf_backend_omit_section_dynsym.
(_bfd_elf_link_omit_section_dynsym): Declare.
* elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
(elf_backend_omit_section_dynsym): Use it for frvfdpic.
* elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
(_bfd_elf_link_renumber_dynsyms): ... this function.
* elfxx-target.h (elf_backend_omit_section_dynsym): Default to
_bfd_elf_link_omit_section_dynsym).
(elfNN_bed): Added elf_backend_omit_section_dynsym.
ld/ChangeLog:
* emulparams/elf32frvfd.sh (GENERATE_PIE_SCRIPT): Set to yes.
ld/testsuite/ChangeLog:
* ld-frv/fdpic-pie-1.d: Adjust for pie-specific link script.
* ld-frv/fdpic-pie-2.d: Likewise.
* ld-frv/fdpic-pie-6.d: Likewise.
* ld-frv/fdpic-pie-7.d: Likewise.
* ld-frv/fdpic-pie-8.d: Likewise.
* ld-frv/fdpic-shared-1.d: Likewise.
* ld-frv/fdpic-shared-2.d: Likewise.
* ld-frv/fdpic-shared-3.d: Likewise.
* ld-frv/fdpic-shared-4.d: Likewise.
* ld-frv/fdpic-shared-5.d: Likewise.
* ld-frv/fdpic-shared-6.d: Likewise.
* ld-frv/fdpic-shared-7.d: Likewise.
* ld-frv/fdpic-shared-8.d: Likewise.
* ld-frv/fdpic-shared-local-2.d: Likewise.
* ld-frv/fdpic-shared-local-8.d: Likewise.
2004-06-21 14:45:42 +00:00
Nick Clifton b2d65c0b3f Add PowerPC LynxOS support 2004-05-17 19:50:16 +00:00
Jakub Jelinek 8c37241be3 bfd/
* elflink.c (elf_bfd_final_link): Don't output STT_SECTION symbol
	into .dynsym if elf_section_data (sec)->dynindx <= 0.
	Adjust counting of last_local.
	(_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
	other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
	created by the linker nor !SHF_ALLOC.

	* elf32-i386.c (elf_i386_finish_dynamic_sections): Point
	DT_PLTGOT to the start of the .got.plt section instead of the
	.got output section.  Set sh_entsize for .got section in addition
	to .got.plt.
	(elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
	is at sgot->output_section->vma.
	* elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
	DT_PLTGOT to the start of the .got.plt section instead of the
	.got output section.
	(elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
	is at sgot->output_section->vma.  Set sh_entsize for .got section
	in addition to .got.plt.
	* elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
	(bfd_section_from_phdr): Likewise.
	(map_sections_to_segments): Likewise.
	(assign_file_positions_for_segments): Likewise.
	(get_program_header_size): Likewise.
	* elflink.c (bfd_elf_size_dynamic_sections): Set
	elf_tdata (output_bfd)->relro from info->relro.
	* elf-bfd.h (struct elf_obj_tdata): Add relro field.
include/
	* bfdlink.h (struct bfd_link_info): Add relro, relro_start and
	relro_end fields.
	* elf/common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
	(PT_GNU_RELRO): Define.
binutils/
	* readelf.c (get_segment_type): Handle PT_GNU_RELRO.
ld/
	* genscripts.sh: Generate -z combreloc -z now -z relro scripts
	for binaries, -shared and -pie.
	* emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set.
	* emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set.
	* emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to...
	(OTHER_RELRO_SECTIONS): ... this.
	* ldlex.l (DATA_SEGMENT_RELRO_END): Add.
	* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
	-z relro and -z norelro.
	(gld${EMULATION_NAME}_list_options): Add it to usage.
	(gld${EMULATION_NAME}_get_script): Return -z combreloc -z now
	-z relro scripts when appropriate.
	* scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set.
	Create separate .got.plt section if SEPARATE_GOTPLT.
	Move sections which are only written during relocation handling
	to the beginning of RW segment.  If NO_SMALL_DATA, move .got
	before .data.  Add DATA_SEGMENT_RELRO_END directive.
	Include OTHER_RELRO_SECTIONS.
	* ldgram.y (DATA_SEGMENT_RELRO_END): Add.
	* ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END.
	(fold_unary): Likewise.
	(fold_binary): Handle -z relro.
	* ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and
	exp_dataseg_relro_adjust phases.  Add relro_end field.
	* ldmain.c (main): Initialize link_info.relro to FALSE.
	* ldlang.c (lang_size_sections): Handle -z relro.
ld/testsuite/
	* ld-i386/tlspic.rd: Adjust for section reordering changes
	and removal of unneeded STT_SECTION symbols from .dynsym.
	* ld-i386/tlspic.dd: Likewise.
	* ld-i386/tlspic.sd: Likewise.
	* ld-i386/tlsbin.rd: Likewise.
	* ld-i386/tlsbinpic.s: Likewise.
	* ld-i386/tlsbin.dd: Likewise.
	* ld-i386/tlsbin.sd: Likewise.
	* ld-i386/tlsnopic.rd: Likewise.
	* ld-i386/tlsnopic1.s: Likewise.
	* ld-i386/combreloc.d: Likewise.
	* ld-i386/tlsnopic.dd: Likewise.
	* ld-i386/tlsnopic.sd: Likewise.
	* ld-x86-64/tlspic.rd: Likewise.
	* ld-x86-64/tlspic.dd: Likewise.
	* ld-x86-64/tlsbin.dd: Likewise.
	* ld-x86-64/tlspic.sd: Likewise.
	* ld-x86-64/tlsbin.sd: Likewise.
	* ld-x86-64/tlspic.td: Likewise.
	* ld-x86-64/tlsbin.td: Likewise.
	* ld-x86-64/tlsbin.rd: Likewise.
	* ld-s390/tlspic1.s: Likewise.
	* ld-s390/tlsbinpic.s: Likewise.
	* ld-s390/tlspic.rd: Likewise.
	* ld-s390/tlsbin.rd: Likewise.
	* ld-s390/tlspic.dd: Likewise.
	* ld-s390/tlsbin.dd: Likewise.
	* ld-s390/tlsbin.sd: Likewise.
	* ld-s390/tlsbin.td: Likewise.
	* ld-s390/tlspic.sd: Likewise.
	* ld-s390/tlspic.td: Likewise.
	* ld-s390/tlspic1_64.s: Likewise.
	* ld-s390/tlsbinpic_64.s: Likewise.
	* ld-s390/tlspic_64.rd: Likewise.
	* ld-s390/tlsbin_64.rd: Likewise.
	* ld-s390/tlspic_64.dd: Likewise.
	* ld-s390/tlsbin_64.dd: Likewise.
	* ld-s390/tlspic_64.sd: Likewise.
	* ld-s390/tlspic_64.td: Likewise.
	* ld-s390/tlsbin_64.td: Likewise.
	* ld-s390/tlsbin_64.sd: Likewise.
	* ld-powerpc/tlsexe32.r: Likewise.
	* ld-powerpc/tlsso32.r: Likewise.
	* ld-powerpc/tlsso32.d: Likewise.
	* ld-powerpc/tlsso32.g: Likewise.
	* ld-powerpc/tlsso32.t: Likewise.
	* ld-powerpc/tlsexe.r: Likewise.
	* ld-powerpc/tlsso.r: Likewise.
	* ld-powerpc/tlsso.g: Likewise.
	* ld-powerpc/tlsexetoc.r: Likewise.
	* ld-powerpc/tlstocso.r: Likewise.
	* ld-powerpc/tlstocso.g: Likewise.
	* ld-ia64/tlspic.rd: Likewise.
	* ld-ia64/tlspic.dd: Likewise.
	* ld-ia64/tlspic.sd: Likewise.
	* ld-ia64/tlspic.td: Likewise.
	* ld-ia64/tlsbin.rd: Likewise.
	* ld-ia64/tlsbin.sd: Likewise.
	* ld-ia64/tlsbin.td: Likewise.
	* ld-elfvsb/elfvsb.exp: XFAIL non-PIC load offset tests on s390x.
	* ld-shared/shared.exp: Likewise.
2004-05-11 17:08:38 +00:00
Alexandre Oliva 41cf0c6285 * emulparams/elf32frvfd.sh (OUTPUT_FORMAT): Switch to new
elf32-frvfdpic.
2004-05-06 02:46:54 +00:00
Chris Demetriou 23867d6732 [ bfd/ChangeLog ]
2004-04-21  Chris Demetriou  <cgd@broadcom.com>

	* coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
	* elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
	* bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
	(bfd_mips_elf32_create_embedded_relocs): Remove prototypes
	* bfd-in2.h: Regenerate.

[ ld/ChangeLog ]
2004-04-21  Chris Demetriou  <cgd@broadcom.com>

	* ld.texinfo: Remove MIPS --embedded-relocs documentation.
	* emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
	* emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
	(EXTRA_EM_FILE): Use mipsecoff.em
	* emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
	(EXTRA_EM_FILE): Use mipsecoff.em
	* emultempl/mipsecoff.em: Restructure to be included as an
	extra emulation file.
	(check_sections, gld${EMULATION_NAME}_after_open)
	(gld${EMULATION_NAME}_after_allocation)
	(gld${EMULATION_NAME}_get_script)
	(ld_${EMULATION_NAME}_emulation): Remove
	(gld${EMULATION_NAME}_before_parse): Rename to...
	(mipsecoff_before_parse): This.
	(LDEMUL_BEFORE_PARSE): Define.
	* emultempl/mipself.em: Remove file.
	* scripttempl/mips.sc (.rel.sdata): Do not include in output.
	(__runtime_reloc_start, __runtime_reloc_stop): Stop providing
	these symbols.
	* Makefile.am: Remove dependencies on emultempl/mipself.em.
	* Makefile.in: Regenerate.

[ ld/testsuite/ChangeLog ]
2004-04-21  Chris Demetriou  <cgd@broadcom.com>

	* ld-empic/run.c: Removed as part of MIPS --embedded-relocs removal.
	* ld-empic/empic.exp: Likewise.
	* ld-empic/relax.t: Likewise.
	* ld-empic/relax1.c: Likewise.
	* ld-empic/relax2.c: Likewise.
	* ld-empic/relax3.c: Likewise.
	* ld-empic/relax4.c: Likewise.
	* ld-empic/runtest1.c: Likewise.
	* ld-empic/runtest2.c: Likewise.
	* ld-empic/runtesti.s: Likewise.
	* ld-mips-elf/empic1-ln.d: Likewise.
	* ld-mips-elf/empic1-lp.d: Likewise.
	* ld-mips-elf/empic1-mn.d: Likewise.
	* ld-mips-elf/empic1-mp.d: Likewise.
	* ld-mips-elf/empic1-ref.s: Likewise.
	* ld-mips-elf/empic1-sn.d: Likewise.
	* ld-mips-elf/empic1-sp.d: Likewise.
	* ld-mips-elf/empic1-space.s: Likewise.
	* ld-mips-elf/empic1-tgt.s: Likewise.
	* ld-mips-elf/empic2-fwd-0.d: Likewise.
	* ld-mips-elf/empic2-fwd-1.d: Likewise.
	* ld-mips-elf/empic2-fwd-tgt.s: Likewise.
	* ld-mips-elf/empic2-ref.s: Likewise.
	* ld-mips-elf/empic2-rev-0.d: Likewise.
	* ld-mips-elf/empic2-rev-1.d: Likewise.
	* ld-mips-elf/empic2-rev-tgt.s: Likewise.
	* ld-mips-elf/empic2-space.s: Likewise.
	* ld-mips-elf/emrelocs-eb.d: Likewise.
	* ld-mips-elf/emrelocs-el.d: Likewise.
	* ld-mips-elf/emrelocs.ld: Likewise.
	* ld-mips-elf/emrelocs1.s: Likewise.
	* ld-mips-elf/emrelocs2.s: Likewise.
	* ld-mips-elf/mips-elf.exp: Don't run now-removed tests.
2004-04-21 20:52:31 +00:00
Richard Sandiford 52f89c0ab4 * emulparams/elf32bsmip.sh (EXTRA_EM_FILE): Define to irix.
* emulparams/elf64bmip.sh (EXTRA_EM_FILE): Likewise.
	* emulparams/elf32bmipn32.sh (EXTRA_EM_FILE): Likewise.
	* emultempl/irix.em: New file.
	* Makefile.am (eelf32bsmip.c, eelf32bmipn32.c, eelf64bmip.c): Update
	dependencies.
	* Makefile.in: Regenerate.
2004-04-08 14:52:44 +00:00
Nick Clifton 0949843db2 Add (linker) support for CR16C processor 2004-03-30 14:04:32 +00:00
Alexandre Oliva 44349745f2 * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb. 2004-03-20 05:49:27 +00:00
Richard Sandiford 9bf78c997e * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
.MIPS.content* and .MIPS.events* sections.
2004-02-14 11:45:25 +00:00
Daniel Jacobowitz f380691611 * emulparams/armelf.sh, emulparams/armelf_linux.sh: Move
.note.gnu.arm.ident to after allocated sections.  Mark its
	address as 0.
2004-02-09 18:06:20 +00:00
Daniel Jacobowitz 4c8e70d733 * emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
* emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
	* emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
	* emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
	* emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
2004-02-09 17:54:25 +00:00
Jakub Jelinek 13d9421f66 * emulparams/elf64_ia64.sh: Put .rela.opd into
OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
2004-01-24 16:29:40 +00:00
Alan Modra e5c60db524 * emulparams/elf32ppc.sh (COMMONPAGESIZE): Define. 2004-01-15 12:38:19 +00:00
Alexandre Oliva 005e11184b 2003-11-28 Alexandre Oliva <aoliva@redhat.com>
* emulparams/elf32frvfd.sh (EMBEDDED): Clear.
2003-11-05  Alexandre Oliva  <aoliva@redhat.com>
* emulparams/elf32frvfd.sh (STACK_ADDR): Unset.
(MAXPAGESIZE): Set to 64Kb.
(OTHER_READONLY_SECTIONS): Define __ROFIXUP_LIST__ and
__ROFIXUP_END__.  Don't map .rofixup.got any more.
* emulparams/elf32frv.sh (NOP): Set.
2003-10-31  Alexandre Oliva  <aoliva@redhat.com>
* configure.tgt: Add frv-*-*linux*.
2003-09-30  Alexandre Oliva  <aoliva@redhat.com>
* Makefile.am (ALL_EMULATIONS): Added eelf32frvfd.o.
(eelf32frvfd.c): New.
* configure.tgt <frv-*-*>: Added it to targ_extra_emuls.
* emulparams/elf32frv.sh: Reverted previous two patches.
* emulparams/elf32frvfd.sh: New.
* Makefile.in: Rebuilt.
2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
* emulparams/elf32frv.sh (OTHER_READONLY_SECTIONS): Added
.rofixup.got to .rofixup.
2003-09-15  Alexandre Oliva  <aoliva@redhat.com>
* emulparams/elf32frv.sh (MAXPAGESIZE): Make it 256KiB, not 256B.
(TEMPLATE_NAME, GENERATE_SHLIB_SCRIPT): Set.
2004-01-06 19:19:52 +00:00
Jakub Jelinek 060feee54d * emulparams/elf_s390.sh (NO_SMALL_DATA): Set to yes.
* emulparams/elf64_s390.sh (NO_SMALL_DATA): Set to yes.
2004-01-05 09:53:31 +00:00
Nick Clifton 6edf0760c5 Add support for m32r-linux target, including a RELA ABI and PIC. 2003-12-19 11:44:01 +00:00
Nick Clifton 2051433802 Define RELOCATEABLE_OUTPUT_FORMAT 2003-12-04 17:51:43 +00:00
Nick Clifton 58ea8806ac Fix building for FreeBSD 2003-11-28 08:47:07 +00:00
Jim Wilson 55936540a7 Fix -pie core dump with .rela.opd section.
bfd/ChangeLog
	* elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
	(elfNN_ia64_size_dynamic_sections): When stripping sections, check
	for ia64_info->rel_fptr_sec.
ld/ChangeLog
	* emulparams/elf64_ia64.sh (OTHER_PLT_RELOC_SECTIONS): Include
	.rela.opd if -pie.
2003-11-19 01:06:13 +00:00
Alan Modra e0e97e2cfa * emulparams/elf32_i860.sh (TEXT_START_ADDR): Define. 2003-11-04 23:08:03 +00:00
Nick Clifton 325fab4e4e Switch to ELF targeted VxWorks targets 2003-10-30 09:47:15 +00:00
Marek Michalkiewicz 75ca919acf * Makefile.am: Remove old (before GCC 3.3) emulations for AVR
target: avr1200, avr23xx, avr4433, avr44x4, avr85xx, avrmega103,
	avrmega161, avrmega603.  Default to avr2.
	* Makefile.in: Regenerate.
	* configure.tgt: Likewise.
	* emulparams/avr1200.sh: Remove.
	* emulparams/avr23xx.sh: Remove.
	* emulparams/avr4433.sh: Remove.
	* emulparams/avr44x4.sh: Remove.
	* emulparams/avr85xx.sh: Remove.
	* emulparams/avrmega103.sh: Remove.
	* emulparams/avrmega161.sh: Remove.
	* emulparams/avrmega603.sh: Remove.
	* scripttempl/elf32avr.sc: Remove.
2003-10-19 16:46:14 +00:00
Alan Modra 8fbdf3ab38 * Makefile.am (GENSCRIPTS_EXTRA, GEN_EXTRA_DEPENDS): Remove. Use
GENSCRIPTS and GEN_DEPENDS in place of these.
	* Makefile.in: Regenerate.
	* genscripts_extra.sh: Delete.  Merge extra functionality to..
	* genscripts.sh: ..here.

	* emulparams/gld960.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Define.
	* emulparams/gld960coff.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
	* emulparams/lnk960.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
	* emulparams/m88kbcs.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
	* emulparams/vanilla.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
2003-10-16 08:46:35 +00:00
Richard Sandiford 786dbcc3f4 * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Move
definition from elf64btsmip.sh.
	(TEXT_DYNAMIC): Likewise elf32btsmipn32.sh.
	* emulparams/elf32btsmipn32.sh (TEXT_DYNAMIC): Remove.
	* emulparams/elf64btsmip.sh (INITIAL_READONLY_SECTIONS): Remove.
	* emulparams/elf64bmip.sh (SHLIB_TEXT_START_ADDR): Define.
	(EXECUTABLE_SYMBOLS): Set __elf_header correctly for shared objects.
	Define __program_header_table in terms of __elf_header.
2003-10-13 19:48:39 +00:00
H.J. Lu 3f7deb8a34 bfd/
2003-10-10  H.J. Lu  <hongjiu.lu@intel.com>

	* bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
	(bfd_elf64_ia64_after_parse): Likewise.
	* bfd-in2.h: Regenerated.

	* elfxx-ia64.c (oor_ip): New.
	(oor_branch_size): Likewise.
	(bfd_elfNN_ia64_after_parse): Likewise.
	(elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
	equals sizeof (oor_ip).

ld/

2003-10-10  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.am (eelf64_ia64.c): Also depend on
	$(srcdir)/emultempl/ia64elf.em.
	* Makefile.in: Regenerated.

	* emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Set to ia64elf.

	* emultempl/ia64elf.em: New.
2003-10-13 15:55:51 +00:00
Kaz Kojima f19ae42f43 [ld]
* emulparams/shelf32_nbsd.sh (OTHER_SECTIONS): Redefine.

[ld/testsuite]
	* ld-sh/rd-sh.exp (LDFLAGS): Define appropriately for each
	sh64/sh5 targets.
	* ld-sh/sh.exp: Don't do relaxing test for sh64*-*-* and
	sh5*-*-* targets.
	* ld-sh/sh64/relax.exp (emul32): Set to shelf32_nbsd for netbsd.
	* ld-sh/sh64/relfail.exp: Set parameters for netbsd.
	* ld-sh/sh64/sh64.exp: Skip this for netbsd.  Trim the section
	numbers for crangerel1 and crengerel2 tests.
	* ld-sh/sh64/abi32.sd: Update.
	* ld-sh/sh64/abi32.xd: Likewise.
	* ld-sh/sh64/abi64.sd: Likewise.
	* ld-sh/sh64/abi64.xd: Likewise.
	* ld-sh/sh64/abixx-noexp.sd: Likewise.
	* ld-sh/sh64/cmpct1.sd: Likewise.
	* ld-sh/sh64/cmpct1.xd: Likewise.
	* ld-sh/sh64/crange1.rd: Likewise.
	* ld-sh/sh64/crange2.rd: Likewise.
	* ld-sh/sh64/crange3-cmpct.rd: Likewise.
	* ld-sh/sh64/crange3-media.rd: Likewise.
	* ld-sh/sh64/crange3.rd: Likewise.
	* ld-sh/sh64/crangerel1.rd: Likewise.
	* ld-sh/sh64/crangerel2.rd: Likewise.
	* ld-sh/sh64/dlsection.sd: Likewise.
	* ld-sh/sh64/endian.sbd: Likewise.
	* ld-sh/sh64/endian.sld: Likewise.
	* ld-sh/sh64/gotplt.d: Likewise.
	* ld-sh/sh64/init-cmpct.d: Likewise.
	* ld-sh/sh64/init-media.d: Likewise.
	* ld-sh/sh64/init.s: Align functions.
	* ld-sh/sh64/init64.d: Update.
	* ld-sh/sh64/mix1-noexp.sd: Likewise.
	* ld-sh/sh64/mix1.sd: Likewise.
	* ld-sh/sh64/mix1.xd: Likewise.
	* ld-sh/sh64/mix2-noexp.sd: Likewise.
	* ld-sh/sh64/mix2.sd: Likewise.
	* ld-sh/sh64/mix2.xd:Likewise.
	* ld-sh/sh64/rel32.xd: Likewise.
	* ld-sh/sh64/rel64.xd: Likewise.
	* ld-sh/sh64/reldl32.rd: Likewise.
	* ld-sh/sh64/reldl64.rd: Likewise.
	* ld-sh/sh64/shdl32.xd: Update.
	* ld-sh/sh64/shdl64.sd: Likewise.
	* ld-sh/sh64/shdl64.xd: Likewise.
	* ld-sh/shared-1.d: Add -z nocombreloc to ld option.  Update.
	* ld-sh/sub2l-1.d: Make file format match with elf32-sh.*.
	* ld-sh/weak1.d: Likewise.
2003-10-13 05:09:21 +00:00
Daniel Jacobowitz 2f857bd0cc * emulparams/armelf.sh: Define NO_SMALL_DATA.
* emulparams/armelf_linux.sh, emulparams/armelf_oabi.sh,
	emulparams/armnto.sh: Likewise.
2003-10-09 14:06:07 +00:00
Bob Wilson 398b851510 * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS,
OTHER_READWRITE_SECTIONS, OTHER_SECTIONS): Set section addresses to
	zero for relocatable links.
2003-10-07 23:30:20 +00:00
Nick Clifton 85cf2a8a15 Change target of hppa-netbsd port 2003-10-06 11:01:36 +00:00
Alan Modra 71df864f7b * emulparams/elf32ip2k.sh (TEMPLATE_NAME): Define. 2003-08-29 00:34:27 +00:00
Nick Clifton aafdb20733 * Makefile.am (GENSCRIPTS_EXTRA): New script definition which calls
genscripts_extra.sh.
  Rearrange all msp430 depends using this script.
* Makefile.in: Regenerate.
* genscripts_extra.sh: New file: Similar to genscripts.sh, except that the
  script to be run to generate the emulations can be passed
  as an optional parameter instead of being computed from the
  emulation name.
* emulparams/msp430all.sh: New file: Combine all msp430 subdevice definitions
  into one file.
* emulparams/msp430x*.sh: Removed.
2003-08-15 17:04:48 +00:00
Nick Clifton 3b260895e3 Add MSP430 variants 2003-08-08 10:14:52 +00:00
Jason Eckhardt 9d7e2ba5ae 2003-08-04 Christian Groessler <chris@groessler.org>
Jason Eckhardt  <jle@rice.edu>

        * configure.tgt: Recognize new target i860-*-coff.
        * Makefile.am (ALL_EMULATIONS): Add ecoff_i860.o.
        (ecoff_i860.c): New rule.
        * emulparams/coff_i860.sh: New file.
        * scripttempl/i860coff.sc: New file.
        * Makefile.in: Regenerate.
2003-08-06 02:19:05 +00:00
Kaz Kojima 8a1cb15917 * emulparams/shelf.sh (OTHER_SECTIONS): Don't include .stack
section for shared library.
	* emulparams/shelf32.sh (OTHER_SECTIONS): Likewise.
	* emulparams/shelf64.sh (OTHER_SECTIONS): Likewise.
2003-07-30 02:22:07 +00:00
Alan Modra f37f3db78f * emulparams/elf64ppc.sh (GOT): Fix for shell brace matching. 2003-07-28 03:33:48 +00:00
Alan Modra c86b6a7b5e * emulparams/elf64ppc.sh (GOT): Don't merge .toc into .got for ld -r. 2003-07-28 02:42:37 +00:00
Bob Wilson e901de8951 bfd ChangeLog:
* elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
	.got.loc section.  Do not set SEC_ALLOC or SEC_LOAD flags for the
	.xt.lit.plt section.
	(elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
	and allocate memory for it.
	(elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
	section to the .got.loc section.
	(elf_xtensa_finish_dynamic_sections): Fix up call to
	elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
	the address of .got.loc.
	(relax_property_section): Shrink .got.loc to match changes in any
	literal table section.
	(xtensa_is_property_section): Change to match
	xtensa_get_property_section_name.
	(xtensa_is_littable_section): New.
ld ChangeLog:
	* emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS): Replace .xt.lit
	with new .got.loc section.
	(OTHER_READWRITE_SECTIONS): Do not combine linkonce sections for
	non-relocating links.
	(OTHER_SECTIONS): Add .xt.lit here.  Change it to keep linkonce
	sections separate for non-relocating links; likewise for .xt.insn.
2003-07-10 19:01:48 +00:00
Alexandre Oliva 4a096548a6 2001-08-22 Alexandre Oliva <aoliva@redhat.com>
* emulparams/elf32am33lin.sh: Adjust to match kernel parameters.
2001-05-09  Alexandre Oliva  <aoliva@redhat.com>
* configure.host (am33_2.0-*-linux*): Added.
* configure.tgt (am33_2.0-*-linux*): Likewise.
* emulparams/elf32am33lin.sh: New.
* Makefile.am (eelf32am33lin.c): New rule.
* Makefile.in: Rebuilt.
2003-07-10 04:45:16 +00:00
Alexandre Oliva 892bb3264a 2001-04-17 Alexandre Oliva <aoliva@redhat.com>
* emulparams/mn10300.sh (TEMPLATE_NAME): Define.
(GENERATE_SHLIB_SCRIPT): Likewise.
2003-07-10 03:20:26 +00:00
Alan Modra 68f8ff14d1 * emulparams/elf64ppc.sh (OTHER_GOT_SECTIONS): Don't define.
(GOT): Define.
	* emultempl/ppc64elf.em (stub_added): New static var.
	(ppc_create_output_section_statements): Call ppc64_elf_init_stub_bfd.
	(ppc_add_stub_section): Set stub_added.
	(gld${EMULATION_NAME}_finish): Look for .got rather than .toc.  Adjust
	ppc64_elf_size_stubs call and test for stubs.
	* scripttempl/elf.sc (GOT): Define and use.
2003-07-10 00:38:19 +00:00
Joern Rennecke 3a51fda661 Allow to override sh64 initial stack value with --defsym:
* emulparams/shelf32.sh (STACK_ADDR): Don't define.
	(OTHER_SECTIONS): Include .stack.
	* emulparams/shelf64.sh (OTHER_SECTIONS): Likewise.
2003-07-04 16:07:01 +00:00
Jakub Jelinek 9203ba999f bfd/
* elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
	(elfNN_ia64_dynamic_symbol_p): Change info->shared into
	!info->executable.
	(get_fptr): For -pie create .opd as writable section and create
	.rela.opd as well.
	(elfNN_ia64_check_relocs): Change info->shared into
	!info->executable.
	(allocate_fptr): Likewise.
	(allocate_dynrel_entries): Account for a relative reloc for -pie
	@fptr().  Don't account for a relative reloc if -pie want_ltoff_fptr
	for undefweak symbol.  Account for an IPLT reloc in .rela.opd
	section if -pie.
	(set_got_entry): Don't create a relative reloc if -pie
	want_ltoff_fptr for undefweak symbol.
	(set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
	(elfNN_ia64_relocate_section): Emit a relative reloc for -pie
	@fptr().

	* elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
	even if -pie.
	* elf32-i386.c (elf_i386_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
ld/
	* emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't include
	.opd if -pie.
	(OTHER_READWRITE_SECTIONS): Include .opd if -pie.
	* scripttempl/elf.sc: Use SHLIB_DATA_ADDR instead of DATA_ADDR
	if -pie.
2003-07-04 13:53:38 +00:00
Alan Modra 1579bae1cd Convert to C90 2003-06-28 05:28:54 +00:00
Richard Sandiford f4984206d8 include/elf/
* h8.h (E_H8_MACH_H8300SXN): New flag.

bfd/
	* archures.c (bfd_mach_h8300sxn): New architecture.
	* bfd-in2.h: Regenerate.
	* cpu-h8300.c (h8300_scan): Check for 'sxn'.
	(h8300sxn_info_struct): New.
	(h8300sx_info_struct): Link to it.
	* elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
	(elf32_h8_final_write_processing): Likewise.

gas/
	* config/tc-h8300.c (h8300sxnmode): New.
	(md_pseudo_table): Add .h8300sxn entry.  Sync others with FSF version.

ld/
	* configure.tgt (h8300*): Add h8300sxn emulations.
	* Makefile.am (ALL_EMULATIONS): Add eh8300sxn.o and eh8300sxnelf.o.
	(eh8300sxn.c, eh8300sxnelf.c): New rules.
	* Makefile.in: Regenerate.
	* emulparams/h8300sxnelf.sh, emulparams/h8300sxn.sh: New files.
2003-06-10 07:09:31 +00:00