Commit Graph

16 Commits

Author SHA1 Message Date
Andreas Krebbel 82057c771e S/390: Move binary start to 16M.
Turned out that by moving the binary start to 256M I've hit a case with
potentially a lot of aliasing in the branch target buffer between
binaries and shared libs.  So moving on.

Tested on s390x. No regressions.

ld/ChangeLog:

2016-10-10  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* emulparams/elf64_s390.sh: Move binary start to 16M.
	* testsuite/ld-s390/tlsbin_64.dd: Adjust testcases accordingly.
	* testsuite/ld-s390/tlsbin_64.rd: Likewise.
2016-10-10 17:09:03 +02:00
Andreas Krebbel 7c4236c350 S/390: Move start of 64 bit binaries from 2GB to 256MB.
ld/ChangeLog:

2016-09-23  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* emulparams/elf64_s390.sh: Change TEXT_START_ADDR to 256MB.
	* testsuite/ld-s390/tlsbin_64.dd: Adjust testcase accordingly.
	* testsuite/ld-s390/tlsbin_64.rd: Likewise.
2016-09-23 11:26:05 +02:00
H.J. Lu e4492aa0d8 Remove trailing white spaces in ld
* deffilep.y: Remove trailing white spaces.
	* elf-hints-local.h: Likewise.
	* ldexp.c: Likewise.
	* ldlang.h: Likewise.
	* ldmisc.c: Likewise.
	* ldwrite.c: Likewise.
	* pe-dll.c: Likewise.
	* emulparams/criself.sh: Likewise.
	* emulparams/crislinux.sh: Likewise.
	* emulparams/elf32_tic6x_le.sh: Likewise.
	* emulparams/elf32bmipn32-defs.sh: Likewise.
	* emulparams/elf32mb_linux.sh: Likewise.
	* emulparams/elf32mep.sh: Likewise.
	* emulparams/elf32microblaze.sh: Likewise.
	* emulparams/elf32ppc.sh: Likewise.
	* emulparams/elf64_s390.sh: Likewise.
	* emulparams/elf64alpha.sh: Likewise.
	* emulparams/elf_s390.sh: Likewise.
	* emulparams/elf_x86_64.sh: Likewise.
	* emulparams/tic80coff.sh: Likewise.
	* emultempl/aix.em: Likewise.
	* emultempl/avrelf.em: Likewise.
	* emultempl/cr16elf.em: Likewise.
	* emultempl/pe.em: Likewise.
	* emultempl/pep.em: Likewise.
	* emultempl/spuelf.em: Likewise.
	* emultempl/tic6xdsbt.em: Likewise.
2013-01-10 20:08:03 +00:00
Andreas Krebbel 470b557aaf 2012-07-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* elf64-s390.c: Include elf-s390-common.c.
	(R_390_IRELATIVE): New reloc.
	(elf_s390_reloc_type_lookup): Support R_390_IRELATIVE.
	(RELA_ENTRY_SIZE): New macro.
	(elf_s390_link_hash_entry): New fields ifunc_resolver_address and
	*ifunc_resolver_section.
	(struct plt_entry): New struct.
	(struct elf_s390_obj_tdata): New field local_plt.
	(elf_s390_local_plt): New macro.
	(struct elf_s390_link_hash_table): New field irelifunc.
	(ELF64): New macro.
	(link_hash_newfunc): Initialize new fields.
	(elf_s390_check_relocs): Handle IFUNC symbols.
	(elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC
	symbols.
	(allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for
	IFUNC symbols.
	(elf_s390_size_dynamic_sections): Handle IFUNC symbols.
	(elf_s390_relocate_section): Likewise.
	(elf_s390_finish_dynamic_symbol): Likewise.
	(elf_s390_finish_dynamic_sections): Handle local IFUNC symbols.
	(elf_s390_finish_ifunc_symbol): New function.
	(elf_s390_gc_sweep_hook): Handle local plt entries.
	(elf_backend_add_symbol_hook): Define.
	* elf32-s390.c: See elf64-s390.c changes.
	* elf-s390-common.c: New file.
	* bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field.
	* libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for
	BFD_RELOC_390_IRELATIVE.
	* reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation.

2012-07-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* elf/s390.h (START_RELOC_NUMBERS): Define R_390_IRELATIVE reloc.

2012-07-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* emulparams/elf_s390.sh (IREL_IN_PLT): Define.
	* emulparams/elf64_s390.sh (IREL_IN_PLT): Define.
2012-07-13 15:47:27 +00:00
Alan Modra 485cf67968 * scripttempl/elf.sc (NO_REL_RELOCS, NO_RELA_RELOCS, NON_ALLOC_DYN):
Handle these defines.
	* emulparams/criself.sh, * emulparams/crislinux.sh,
	* emulparams/elf32am33lin.sh, * emulparams/elf32fr30.sh,
	* emulparams/elf32_i860.sh, * emulparams/elf32ip2k.sh,
	* emulparams/elf32mcore.sh, * emulparams/elf32ppccommon.sh,
	* emulparams/elf32ppcwindiss.sh, * emulparams/elf32_sparc.sh,
	* emulparams/elf32_spu.sh, * emulparams/elf32vax.sh,
	* emulparams/elf64alpha.sh, * emulparams/elf64mmix.sh,
	* emulparams/elf64ppc.sh, * emulparams/elf64_s390.sh,
	* emulparams/elf64_sparc.sh, * emulparams/elf_s390.sh,
	* emulparams/elf_x86_64.sh, * emulparams/h8300elf.sh,
	* emulparams/hppa64linux.sh, * emulparams/hppalinux.sh,
	* emulparams/m68kelf.sh, * emulparams/mn10200.sh,
	* emulparams/pjelf.sh, * emulparams/ppclynx.sh,
	* emulparams/shelf32.sh, * emulparams/shelf_nto.sh,
	* emulparams/shelf.sh, * emulparams/shelf_vxworks.sh,
	* emulparams/shlelf32_linux.sh, * emulparams/shlelf_linux.sh,
	* emulparams/shlelf_nto.sh (NO_REL_RELOCS): Set.
	* emulparams/arcelf.sh, * emulparams/elf32_i960.sh,
	* emulparams/elf32openrisc.sh, * emulparams/elf_i386_be.sh,
	* emulparams/elf_i386_ldso.sh, * emulparams/elf_i386.sh,
	* emulparams/elf_i386_vxworks.sh, * emulparams/i386lynx.sh,
	* emulparams/i386moss.sh, * emulparams/i386nto.sh,
	* emulparams/or32elf.sh, * emulparams/scoreelf.sh (NO_RELA_RELOCS): Set.
2008-10-22 05:20:44 +00:00
Alan Modra 88bba78dc4 PR 4515
* genscripts.sh: Delete all references to NONPAGED_TEXT_START_ADDR.
	* ldint.texinfo: Likewise.
	* emulparams/armaoutb.sh (NONPAGED_TEXT_START_ADDRESS): Delete.
	* emulparams/armaoutl.sh: Likewise.
	* emulparams/arcelf.sh (NONPAGED_TEXT_START_ADDR): Delete.
	* emulparams/bfin.sh: Likewise
	* emulparams/crisaout.sh: Likewise
	* emulparams/elf32_sparc.sh: Likewise
	* emulparams/elf32am33lin.sh: Likewise
	* emulparams/elf32b4300.sh: Likewise
	* emulparams/elf32bmip.sh: Likewise
	* emulparams/elf32mcore.sh: Likewise
	* emulparams/elf32xtensa.sh: Likewise
	* emulparams/elf64_s390.sh: Likewise
	* emulparams/elf64_sparc.sh: Likewise
	* emulparams/elf64alpha.sh: Likewise
	* emulparams/elf_i386.sh: Likewise
	* emulparams/elf_i386_be.sh: Likewise
	* emulparams/elf_i386_chaos.sh: Likewise
	* emulparams/elf_i386_ldso.sh: Likewise
	* emulparams/elf_i386_vxworks.sh: Likewise
	* emulparams/elf_s390.sh: Likewise
	* emulparams/elf_x86_64.sh: Likewise
	* emulparams/i386aout.sh: Likewise
	* emulparams/i386moss.sh: Likewise
	* emulparams/i386msdos.sh: Likewise
	* emulparams/i386nto.sh: Likewise
	* emulparams/i386nw.sh: Likewise
	* emulparams/m68kaout.sh: Likewise
	* emulparams/m68kelf.sh: Likewise
	* emulparams/ppcnw.sh: Likewise
	* emulparams/sun4.sh: Likewise
	* emulparams/tic80coff.sh: Likewise
	* emulparams/vaxnbsd.sh: Likewise
	* emulparams/armnbsd.sh (NONPAGED_TEXT_START_ADDR): Delete.
	(TEXT_START_ADDR): Set for -n, -N.
	* emulparams/coff_sparc.sh: Likewise
	* emulparams/elf32vax.sh: Likewise
	* emulparams/i386bsd.sh: Likewise
	* emulparams/i386go32.sh: Likewise
	* emulparams/i386linux.sh: Likewise
	* emulparams/i386lynx.sh: Likewise
	* emulparams/i386mach.sh: Likewise
	* emulparams/m68k4knbsd.sh: Likewise
	* emulparams/m68klinux.sh: Likewise
	* emulparams/m68knbsd.sh: Likewise
	* emulparams/ns32knbsd.sh: Likewise
	* emulparams/pc532macha.sh: Likewise
	* emulparams/ppclynx.sh: Likewise
	* emulparams/scoreelf.sh: Likewise
	* emulparams/sparcaout.sh: Likewise
	* emulparams/sparclinux.sh: Likewise
	* emulparams/sun3.sh: Likewise
	* emulparams/vsta.sh: Likewise
2007-08-09 11:02:24 +00:00
H.J. Lu 24718e3ba5 bfd/
2006-05-30  H.J. Lu  <hongjiu.lu@intel.com>

	* bfd.c (bfd_emul_get_maxpagesize): New.
	(bfd_elf_set_pagesize): Likewise.
	(bfd_emul_set_maxpagesize): Likewise.
	(bfd_emul_get_commonpagesize): Likewise.
	(bfd_emul_set_commonpagesize): Likewise.
	* bfd-in2.h: Regenerated.

	* elf-bfd.h (elf_backend_data): Add commonpagesize.
	(xvec_get_elf_backend_data): New.
	(get_elf_backend_data): Use xvec_get_elf_backend_data.

	* elf32-arm.c (elf32_arm_vxworks_bed): Remove const.
	* elfxx-target.h (elfNN_bed): Likewise.

	* elf32-arm.c (ELF_COMMONPAGESIZE): Defined.
	* elf32-mips.c (ELF_COMMONPAGESIZE): Likewise.
	* elf32-ppc.c (ELF_COMMONPAGESIZE): Likewise.
	* elf32-sh.c (ELF_COMMONPAGESIZE): Likewise.
	* elf32-sh64.c (ELF_COMMONPAGESIZE): Likewise.
	* elf32-sparc.c (ELF_COMMONPAGESIZE): Likewise.
	* elf64-alpha.c (ELF_COMMONPAGESIZE): Likewise.
	* elf64-ppc.c (ELF_COMMONPAGESIZE): Likewise.
	* elf64-sparc.c (ELF_COMMONPAGESIZE): Likewise.
	* elf64-x86-64.c (ELF_COMMONPAGESIZE): Likewise.
	* elfn32-mips.c (ELF_COMMONPAGESIZE): Likewise.
	* elfxx-ia64.c (ELF_COMMONPAGESIZE): Likewise.

	* elfxx-target.h (ELF_COMMONPAGESIZE): Define if not defined.
	(elfNN_bed): Initialize commonpagesize with ELF_COMMONPAGESIZE.

	* targets.c (bfd_find_target): Support NULL abfd.

ld/

2006-05-30  H.J. Lu  <hongjiu.lu@intel.com>

	* emulparams/arcelf.sh (MAXPAGESIZE): Changed to
	"CONSTANT (MAXPAGESIZE)".
	* emulparams/armelf_nbsd.sh: Likewise.
	* emulparams/armelf_vxworks.sh: Likewise.
	* emulparams/armnto.sh: Likewise.
	* emulparams/armsymbian.sh: Likewise.
	* emulparams/crislinux.sh: Likewise.
	* emulparams/elf32_i860.sh: Likewise.
	* emulparams/elf32_i960.sh: Likewise.
	* emulparams/elf32am33lin.sh: Likewise.
	* emulparams/elf32bfinfd.sh: Likewise.
	* emulparams/elf32bmipn32-defs.sh: Likewise.
	* emulparams/elf32frvfd.sh: Likewise.
	* emulparams/elf32i370.sh: Likewise.
	* emulparams/elf32lppcnto.sh: Likewise.
	* emulparams/elf32mcore.sh: Likewise.
	* emulparams/elf32openrisc.sh: Likewise.
	* emulparams/elf32ppcnto.sh: Likewise.
	* emulparams/elf32ppcwindiss.sh: Likewise.
	* emulparams/elf32vax.sh: Likewise.
	* emulparams/elf32xc16x.sh: Likewise.
	* emulparams/elf32xc16xl.sh: Likewise.
	* emulparams/elf32xc16xs.sh: Likewise.
	* emulparams/elf64_aix.sh: Likewise.
	* emulparams/elf64hppa.sh: Likewise.
	* emulparams/elf64mmix.sh: Likewise.
	* emulparams/elf_i386_be.sh: Likewise.
	* emulparams/elf_i386_chaos.sh: Likewise.
	* emulparams/elf_i386_ldso.sh: Likewise.
	* emulparams/hppa64linux.sh: Likewise.
	* emulparams/hppalinux.sh: Likewise.
	* emulparams/hppaobsd.sh: Likewise.
	* emulparams/i386lynx.sh: Likewise.
	* emulparams/i386moss.sh: Likewise.
	* emulparams/i386nto.sh: Likewise.
	* emulparams/i386nw.sh: Likewise.
	* emulparams/m32relf_linux.sh: Likewise.
	* emulparams/m68kpsos.sh: Likewise.
	* emulparams/or32elf.sh: Likewise.
	* emulparams/pjelf.sh: Likewise.
	* emulparams/pjlelf.sh: Likewise.
	* emulparams/ppclynx.sh: Likewise.
	* emulparams/ppcnw.sh: Likewise.
	* emulparams/shelf32_nbsd.sh : Likewise.
	* emulparams/shelf_nbsd.sh: Likewise.
	* emulparams/shelf_nto.sh: Likewise.
	* emulparams/shlelf_nto.sh: Likewise.
	* emulparams/xtensa-config.sh: Likewise.

	* emulparams/armelf_linux.sh (MAXPAGESIZE): Changed to
	"CONSTANT (MAXPAGESIZE)".
	(COMMONPAGESIZE): Changed to "CONSTANT (COMMONPAGESIZE)".
	* emulparams/elf32_sparc.sh: Likewise.
	* emulparams/elf32bmip.sh: Likewise.
	* emulparams/elf32ppccommon.sh: Likewise.
	* emulparams/elf64_ia64.sh: Likewise.
	* emulparams/elf64_s390.sh: Likewise.
	* emulparams/elf64_sparc.sh: Likewise.
	* emulparams/elf64alpha.sh: Likewise.
	* emulparams/elf64ppc.sh: Likewise.
	* emulparams/elf_i386.sh: Likewise.
	* emulparams/elf_i386_vxworks.sh: Likewise.
	* emulparams/elf_s390.sh: Likewise.
	* emulparams/elf_x86_64.sh: Likewise.
	* emulparams/shlelf32_linux.sh: Likewise.
	* emulparams/shlelf_linux.sh: Likewise.

	* emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Changed to
	"CONSTANT (COMMONPAGESIZE)".
	* emulparams/elf32btsmipn32.sh: Likewise.

	* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
	"-z max-page-size=" and "-z common-page-size=".
	(gld${EMULATION_NAME}_list_options): Likewise.

	* ld.h (ld_config_type): Add maxpagesize and commonpagesize.

	* ld.texinfo: Document "-z max-page-size=" and
	"-z common-page-size=".

	* ldexp.c (exp_print_token): Handle CONSTANT.
	(fold_name): Likewise.
	* ldgram.y: Likewise.
	* ldlex.l: Likewise.

	* ldmain.c (main): Initiliaze config.maxpagesize and
	config.commonpagesize. Call bfd_emul_set_maxpagesize if
	config.maxpagesize isn't 0. Call bfd_emul_set_commonpagesize if
	config.commonpagesize config.maxpagesize isn't 0.
ld/testsuite/

2006-05-30  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elf/binutils.exp: New file.
	* ld-elf/commonpage1.d: Likewise.
	* ld-elf/maxpage1.d: Likewise.
	* ld-elf/maxpage1.s: Likewise.
2006-05-30 16:45:32 +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
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
Jakub Jelinek 36af4a4e51 bfd/
* elflink.h (elf_link_add_object_symbols): Use !info->executable
	instead of info->shared where appropriate.
	(bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
	* elflink.c (_bfd_elf_create_got_section): Likewise.
	(_bfd_elf_link_create_dynamic_sections): Likewise.
	(_bfd_elf_link_assign_sym_version): Likewise.
	* elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
	and DT_DEBUG dynamic tag even for position independent executables.
	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
	* elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
	* elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
	* elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
	* elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
	* elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
	* elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
	* elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
	* elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
include/
	* bfdlink.h (struct bfd_link_info): Add pie and executable
	bits.
ld/
	* lexsup.c (OPTION_PIE): Define.
	(ld_options): Add -pie and --pic-executable options.
	(parse_args): Handle OPTION_PIE.
	* ldmain.c (main): Initialize link_info.pie and
	link_info.executable.
	* genscripts.sh: Generate PIE scripts.
	* ld.texinfo: Document -pie and --pic-executable options.
	* emultempl/elf32.em (gld${EMULATION_NAME}_after_open):
	(gld${EMULATION_NAME}_place_orphan): Likewise.
	(gld${EMULATION_NAME}_get_script): Include PIE scripts.
	* scripttempl/elf.sc: In PIE scripts set . the same way as in
	shared scripts.
	* emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Set to yes.
	* emulparams/elf64_ia64.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf32ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf64ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf_x86_64.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf32_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf64_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf64alpha.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf64_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Likewise.
2003-05-30 15:50:12 +00:00
Jakub Jelinek cad91d28c9 * emulparams/elf64_s390.sh (LIBPATH_SUFFIX): Set to 64.
* emulparams/elf_x86_64.sh (LIBPATH_SUFFIX): Likewise.
	* emulparams/elf64_sparc.sh (LIBPATH_SUFFIX): Set instead of suffix.
2003-02-06 14:45:04 +00:00
Daniel Jacobowitz 9c8ebd6a51 * Makefile.am (eelf32iq10.c): Fix tab/whitespace mixup.
* Makefile.am (ldmain.o): Add @TARGET_SYSTEM_ROOT_DEFINE@.
	(GENSCRIPTS): Add @use_sysroot@.
	* Makefile.in: Regenerated.
	* configure.host: Move setting of NATIVE_LIB_DIRS to...
	* configure.tgt: ... here.  Use ${target} instead of ${host}
	for NATIVE_LIB_DIRS.
	* configure.in: Add --with-sysroot.
	* configure: Regenerated.
	* genscripts.sh: Accept use_sysroot option.  Set new variables
	NATIVE and USE_LIBPATH.  Prepend "=" to directory names if
	$use_sysroot.  Don't search $tool_lib if $use_sysroot.
	* ldfile.c (ldfile_add_library_path): Handle leading '='.
	* ldmain.c (TARGET_SYSTEM_ROOT): Define if not defined.
	(ld_sysroot): New variable.
	(main): Initialize ld_sysroot.
	* ldmain.h (ld_sysroot): New extern.
	* emultempl/elf32.em: Use NATIVE and USE_LIBPATH instead of
	searching $EMULATION_LIBPATH.
	(gld${EMULATION_NAME}_add_sysroot): New function.
	(gld${EMULATION_NAME}_check_ld_so_conf): Use it.  Honor ld_sysroot.
	(gld${EMULATION_NAME}_after_open): Likewise.  Only search
	environment variables if $NATIVE.
	* ld.texinfo (Options): Mention "=" prefix in the description of -L.
	* NEWS: Mention --with-sysroot.

	* emulparams/elf32bmipn32-defs.sh: Set NATIVE and LIBPATH_SUFFIX
	instead of setting LIB_PATH.
	* emulparams/elf32ppc.sh: Likewise.
	* emulparams/elf64_s390.sh: Likewise.
	* emulparams/elf64_sparc.sh: Likewise.
	* emulparams/elf64ppc.sh: Likewise.
	* emulparams/elf_x86_64.sh: Likewise.

	* emulparams/elf64_aix.sh: Add "=" prefixes to LIB_PATH.
	* emulparams/elf64hppa.sh: Add "=" prefixes to LIB_PATH.
2003-01-06 16:14:01 +00:00
Jakub Jelinek f52d1d6405 * config.bfd (s390-*-linux*): Add targ64_selvecs.
(s390x-*-linux*): Add targ_selvecs.

	* config.table: Use mh-s390pic for s390x too.

	* configure.tgt (s390x-*-linux*): Add elf_s390 emulation.
	(s390-*-linux*): Add elf64_s390 emulation if want64.
	* emulparams/elf64_sparc.sh (LIB_PATH): Update to match 2002-05-22
	genscript.sh changes.
	* emulparams/elf_x86_64.sh (LIB_PATH): Likewise.
	* emulparams/elf64_s390.sh (LIB_PATH): Set up native 64 bit dirs.
2002-10-16 19:54:54 +00:00
Martin Schwidefsky d86bcc1089 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
* emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit".
	* emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit".
2002-02-19 18:58:04 +00:00
Alan Modra 563e308f24 * ld.texinfo: Document that fill values now use the four least
significant bytes.
	* emulparams/elf32fr30.sh (NOP): Update.
	* emulparams/elf32mcore.sh: Likewise.
	* emulparams/elf64_s390.sh: Likewise.
	* emulparams/elf_i386.sh: Likewise.
	* emulparams/elf_i386_be.sh: Likewise.
	* emulparams/elf_i386_chaos.sh: Likewise.
	* emulparams/elf_i386_ldso.sh: Likewise.
	* emulparams/elf_s390.sh: Likewise.
	* emulparams/elf_x86_64.sh: Likewise.
	* emulparams/i386moss.sh: Likewise.
	* emulparams/i386nw.sh: Likewise.
	* emulparams/m68kelf.sh: Likewise.
	* scripttempl/elf.sc: Update NOP comment.
	* scripttempl/elfi370.sc: Likewise.
	* scripttempl/elfm68hc11.sc: Likewise.
	* scripttempl/elfm68hc12.sc: Likewise.
	* scripttempl/nw.sc: Likewise.
2001-08-17 09:51:08 +00:00
Nick Clifton a85d7ed0f0 Add s390 support 2001-02-10 00:58:38 +00:00