Commit Graph

10736 Commits

Author SHA1 Message Date
Richard Sandiford 59c5956905 * configure.ac (mips*-*-*linux*, mips*-*-gnu*): Use mt-mips-gnu.
* configure: Regenerate.

config/
	* mt-mips16-compat: New file, taken from mt-mips-elfoabi.
	* mt-mips-elfoabi: Include mt-mips16-compat.
	* mt-mips-gnu: New file.
2008-08-16 06:47:17 +00:00
Corinna Vinschen 9258eca9d4 * mkgroup.c (fetch_current_pgrp_sid): New function to fetch primary
group SID from user token.
	(current_group): Move up in file.  Move fetching primary group SID to
	fetch_current_pgrp_sid.
	(enum_local_groups): Check if current SID is the same as current user's
	primary group SID.
	(enum_groups): Ditto.
	(main): Call fetch_current_pgrp_sid before enumerating groups.  Call
	current_group only if current group hasn't been enumerated already.
	* mkpasswd.c (fetch_current_user_sid): New function to fetch current
	user SID from user token.
	(current_user): Move fetching current user SID to
	fetch_current_user_sid.
	(enum_users): Check if current SID is the same as current user's SID.
	(main): Call fetch_current_user_sid before enumerating users.  Call
	current_user only if current user hasn't been enumerated already.
2008-08-15 13:08:47 +00:00
Corinna Vinschen 2bd94f906d * mount.cc (mount_info::get_mounts_here): Don't subtract 2 from
Length if it's 0 anyway.
2008-08-15 12:33:26 +00:00
Corinna Vinschen 975f052c60 * mount.cc (mount_info::create_root_entry): Create default cygdrive
prefix with MOUNT_NOPOSIX flag.
2008-08-15 12:06:38 +00:00
Corinna Vinschen 2b41d940ca * path.cc (symlink_info::check): Don't use eabuf when trying to open
file a second time.  Call NtOpenFile instead of NtCreateFile in this
	case.
2008-08-15 10:19:12 +00:00
Jeff Johnston 84132c9d9f 2008-08-14 Jie Zhang <jie.zhang@analog.com>
* bfin/Makefile.in: (top_srcdir): Define.
        (mkinstalldirs): Define.
        (BOARD_SCRIPTS): Define.
        (BOARD_LDFLAGS): Define.
        (BOARD_BSP): Define.
        (BOARD_CRT0S): Define.
        (BOARD_OBJS): Define.
        (BOARD_TEST): Define.
        (BOARD_INSTALL): Define.
        (INCLUDES): Add -I$(srcdir)/include.
        (all): Add ${BOARD_CRT0S} and ${BOARD_BSP}.
        (.c.S): Remove target.
        (crt0.o): New target.
        (basiccrt.o): Likewise.
        (basiccrtb.o): Likewise.
        (basiccrts.o): Likewise.
        (basiccrt561.o, basiccrt561s.o, basiccrt561b.o): Likewise
        (clean mostlyclean): Remove ${BOARD_BSP}.
        (install): Depend on ${BOARD_INSTALL}.
        (install-sim): Reformat.
        (install-board): New target.
        * bfin/basiccrt.S: Remove useless __ADSPBF561_COREB__ in
        workaround code for 05000229.
        * bfin/syscalls.c (do_syscall): Use `EXCPT 0' instead of
        `RAISE 0' for syscall.
        * bfin/basiccrt.S: New file.
        * bfin/bf5*ld: New file.
        * bfin/bfin-common-mc.ld: New file.
        * bfin/bfin-common-sc.ld: New file.
        * bfin/include/blackfin.h: New file.
        * bfin/include/cdefBF5*.h: New file.
        * bfin/include/cdef_LPBlackfin.h: New file.
        * bfin/include/cdefblackfin.h: New file.
        * bfin/include/cplb.h: New file.
        * bfin/include/cplbtab.h: New file.
        * bfin/include/defBF5*.h: New files.
        * bfin/include/def_LPBlackfin.h: New files.
        * bfin/include/defblackfin.h: New file.
        * bfin/include/sys/_adi_platform.h: New file.
        * bfin/include/sys/anomaly_macros_rtl.h: New file.
        * bfin/include/sys/excause.h: New file.
        * bfin/include/sys/exception.h: New file.
        * bfin/include/sys/mc_typedef.h: New file.
        * bfin/include/sys/platform.h: New file.
        * bfin/include/sys/pll.h: New file.
        * bfin/include/sysreg.h: New file.
        * libnosys/configure.in (MISSING_SYSCALL_NAMES): Don't define
        for bfin.
        * libnosys/configure: Regenerate.
2008-08-14 22:00:47 +00:00
Keith Marshall d434b57f86 Add missing dependencies for building libmingwex.a. 2008-08-14 15:13:18 +00:00
Corinna Vinschen 39f50e387b * fhandler_disk_file.cc (fhandler_disk_file::link): Fix linking
against symlinks.
2008-08-14 15:00:52 +00:00
Corinna Vinschen 88797e5979 * external.cc (cygwin_internal): Call set_security_attribute with
additional path_conv argument.
	* fhandler.cc (fhandler_base::open): Ditto.
	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Never set DOS
	R/O attribute when using ACLs.
	(fhandler_disk_file::mkdir): Ditto.  Set
	security descriptor on remote dirs after creating the dir, same as in
	fhandler_base::open.
	* fhandler_socket.cc (fhandler_socket::bind): Ditto for remote AF_LOCAL
	socket files.
	* path.cc (symlink_worker): Ditto. for remote symlinks.
	* security.cc (alloc_sd): Take additional path_conv argument.
	Accommodate throughout.  Drop setting FILE_WRITE_EA/FILE_READ_EA
	flags unconditionally (was only necessary for "ntea"). Don't set
	FILE_READ_ATTRIBUTES and FILE_WRITE_ATTRIBUTES unconditionally on
	Samba.  Add comment to explain.  Drop useless setting of
	STANDARD_RIGHTS_WRITE, it's in FILE_GENERIC_WRITE anyway.
	Remove FILE_READ_ATTRIBUTES bit from FILE_GENERIC_EXECUTE so as not
	to enforce read permissions on Samba.
	(set_security_attribute): Take additional path_conv argument.
	* security.h (set_security_attribute): Change prototype accordingly.
2008-08-14 14:05:04 +00:00
Corinna Vinschen 56d8179570 * mount.cc (NT_MAX_PATH): Define.
(longopts): Rename mount-commands option to mount-entries.
	(opts): Remove removed options.
	(struct opt): Move up in file to allow using it in usage.
	(usage): Change text for --mount-entries option.  Remove
	-X option.  Add valid options output.
	(main): Remove handling -b option.
	(convert_spaces): New static function to convert spaces to "\040"
	string.
	(mount_entries): Renamed from mount_commands.  Rewrite to emit
	/etc/fstab compatible output.
	(show_cygdrive_info): Print "nouser" rather than "system".
	* umount.cc (longopts): Remove remove-all-mounts,
	remove-cygdrive-prefix, remove-system-mounts, system and user options.
	(opts): Remove A, c, s, S, u options.
	(usage): Remove text for all removed options.
	(main): Remove handling for all removed options.
	(remove_all_mounts): Remove.
	(remove_all_system_mounts): Remove.
	(remove_cygdrive_prefix): Remove.
	* utils.sgml: Fix mount and umount documentation.  Move description
	of (cyg,not)exec options to mount table section.
2008-08-13 16:35:04 +00:00
Corinna Vinschen 04a6c4efd7 * pathnames.sgml: Move description for (cyg,not)exec mount options
from utils.sgml here.  Clarify nouser mount points.
2008-08-13 16:34:49 +00:00
Corinna Vinschen 452f665fb1 * mount.cc (fillout_mntent): Always print noumount option last. 2008-08-13 15:30:52 +00:00
Corinna Vinschen aed2404c0d * mount.cc (fillout_mntent): Print options as taken in fstab and mount. 2008-08-13 15:11:25 +00:00
Corinna Vinschen 5a58591f45 * cyglsa-config: Copy the DLL instead of moving. 2008-08-13 11:05:25 +00:00
Corinna Vinschen 69d704beff * dll_init.cc: Throughout convert to use long pathnames.
* dll_init.h (struct dll): Change name to WCHAR, change operator [] to
	take PWCHAR argument.
2008-08-13 08:25:44 +00:00
Keith Marshall e587bc0e7d Add replacements for remaining members of printf() family. 2008-08-11 22:41:55 +00:00
Corinna Vinschen 0ea2c19934 * syscalls.cc (rename): If newpath doesn't exist, check if .exe suffix
in oldpath has been omitted before appending .exe to newpath.
2008-08-11 15:05:25 +00:00
Corinna Vinschen 36f17b4b40 * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Don't set
eom_detected when EOF is detected, thus returning 0 instead of
	setting errno to ENOSPC.
2008-08-09 11:09:02 +00:00
Eric Weddington a15b3bdef7 Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
	* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
	bfd_mach_avr51): New.
	* bfd-in2.h: Regenerate.
	* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
	architectures. Change comments to match architecture comments in GCC.
	(compatible): Add test for new AVR architectures.
	* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
	bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
	(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
	E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.

gas/
	* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
	architectures. Reorganize list to put mcu types in correct architectures
	and to order list same as in GCC. Use new ISA definitions in
	include/opcode/avr.h.
	* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
	descriptions. Reorganize descriptions to put mcu types in correct
	architectures and to order lists same as in GCC.

include/
	* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
	E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
	(EF_AVR_MACH): Redefine to 0x7F.
	* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
	(AVR_ISA_AVR3): Redefine.
	(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
	AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
	AVR_ISA_AVR6): Define.

ld/
	* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
	and eavr51.o.
	Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
	* Makefile.in: Regenerate.
	* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
	and avr51.
	* emulparams/avr25.sh: New file.
	* emulparams/avr31.sh: New file.
	* emulparams/avr35.sh: New file.
	* emulparams/avr51.sh: New file.
2008-08-09 05:35:13 +00:00
Daniel Jacobowitz 97c16b1b23 2008-08-08 Richard Sandiford <rdsandiford@googlemail.com>
Daniel Jacobowitz  <dan@codesourcery.com>
	    Catherine Moore  <clm@codesourcery.com>
	    Mark Shinwell  <shinwell@codesourcery.com>
	    Maxim Kuvyrkov  <maxim@codesourcery.com>

	* elf32-mips.c (mips_vxworks_copy_howto_rela): Replace with...
	(elf_mips_copy_howto): ...this howto.  Clear the size fields.
	(mips_vxworks_jump_slot_howto_rela): Replace with...
	(elf_mips_jump_slot_howto): ...this howto.
	(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
	and BFD_RELOC_MIPS_JUMP_SLOT.
	(bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
	"R_MIPS_JUMP_SLOT".
	(mips_elf32_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
	(elf_backend_plt_readonly): Define.
	(elf_backend_plt_sym_val): Define for non-VxWorks targets.
	(mips_vxworks_bfd_reloc_type_lookup): Delete.
	(mips_vxworks_bfd_reloc_name_lookup): Likewise.
	(mips_vxworks_rtype_to_howto): Likewise.
	(elf_backend_want_dynbss): Don't define for VxWorks.
	(elf_backend_plt_readonly): Likewise.
	(bfd_elf32_bfd_reloc_type_lookup): Likewise.
	(bfd_elf32_bfd_reloc_name_lookup): Likewise.
	(elf_backend_mips_rtype_to_howto): Likewise.
	(elf_backend_adjust_dynamic_symbol): Likewise.
	(elf_backend_got_symbol_offset): Don't define.
	* elfn32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
	(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
	and BFD_RELOC_MIPS_JUMP_SLOT.
	(bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
	"R_MIPS_JUMP_SLOT".
	(mips_elf32_n32_rtype_to_howto): Handle R_MIPS_COPY and
	R_MIPS_JUMP_SLOT.
	(elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
	(elf_backend_plt_sym_val): Define.
	* elf64-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
	(bfd_elf64_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
	and BFD_RELOC_MIPS_JUMP_SLOT.
	(bfd_elf64_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
	"R_MIPS_JUMP_SLOT".
	(mips_elf64_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
	(elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
	(elf_backend_plt_sym_val): Define.
	* elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Delete.
	(_bfd_mips_elf_use_plts_and_copy_relocs, _bfd_mips_elf_init_stubs)
	(_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): Declare.
	* elfxx-mips.c (mips_elf_la25_stub): New structure.
	(LA25_LUI, LA25_J, LA25_ADDIU): New macros.
	(mips_elf_link_hash_entry): Add "la25_stubs", "has_static_relocs"
	and "has_nonpic_branches" fields.  Remove "is_relocation_target" and
	"is_branch_target".
	(mips_elf_link_hash_table): Add blank lines.  Add
	"use_plts_and_copy_relocs", "reserved_gotno", "strampoline",
	"la25_stubs" and "add_stub_section" fields.
	(mips_htab_traverse_info): New structure.
	(PIC_OBJECT_P, MIPS_ELF_LOAD_WORD): New macros.
	(MIPS_RESERVED_GOTNO): Delete.
	(mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry)
	(mips_n64_exec_plt0_entry, mips_exec_plt_entry): New tables.
	(mips_elf_link_hash_newfunc): Update after the changes to
	mips_elf_link_hash_entry.
	(mips_elf_check_mips16_stubs): Replace the DATA parameter with
	an INFO parameter.  Don't look through warnings symbols here;
	do it in mips_elf_check_symbols instead.
	(mips_elf_create_stub_symbol): New function.
	(mips_elf_la25_stub_hash, mips_elf_la25_stub_eq): New functions.
	(_bfd_mips_elf_init_stubs, mips_elf_local_pic_function_p): Likewise.
	(mips_elf_add_la25_intro, mips_elf_add_la25_trampoline): Likewise.
	(mips_elf_add_la25_stub, mips_elf_check_symbols): New functions.
	(mips_elf_gotplt_index): Check for VxWorks.
	(mips_elf_output_dynamic_relocation): Take the relocation index
	as an extra parameter.  Do not increment reloc_count here.
	(mips_elf_initialize_tls_slots): Update the calls to
	mips_elf_output_dynamic_relocation accordingly.
	(mips_elf_multi_got): Use htab->reserved_gotno instead of
	MIPS_RESERVED_GOTNO.
	(mips_elf_create_got_section): Don't allocate reserved GOT
	entries here.  Unconditionally create .got.plt, but don't
	set its alignment here.
	(mips_elf_relocation_needs_la25_stub): New function.
	(mips_elf_calculate_relocation): Redirect branches and jumps to
	a non-PIC stub if one exists.  Check !h->has_static_relocs instead
	of !htab->is_vxworks when deciding whether to create dynamic
	relocations for R_MIPS_32, R_MIPS_REL32 and R_MIPS_64.
	(_bfd_mips_elf_create_dynamic_sections): Unconditionally call
	_bfd_elf_create_dynamic_sections.  Unconditionally set up
	htab->splt and htab->sdynbss.  Set htab->srelplt to ".rel.plt"
	if !htab->is_vxworks.  Add non-VxWorks values of
	htab->plt_header_size and htab->plt_entry_size.
	(_bfd_mips_elf_check_relocs): Set pointer_equality_needed for
	non-branch static relocations.  Set has_nonpic_branches when an la25
	stub might be required.  Set can_make_dynamic_p to TRUE if R_MIPS_32,
	R_MIPS_REL32 and R_MIPS_64 relocations can be made dynamic,
	rather than duplicating the condition.  Do not make them dynamic
	for read-only sections in non-PIC executable objects.
	Do not protect this code with dynobj == NULL || htab->sgot == NULL;
	handle each group of cases separately.  Add a default case that
	sets has_static_relocs for non-GOT relocations that cannot be
	made dynamic.  Don't set is_relocation_target and is_branch_target.
	Reject non-PIC static relocations in shared objects.
	(_bfd_mips_vxworks_adjust_dynamic_symbol): Fold into...
	(_bfd_mips_elf_adjust_dynamic_symbol): ...here, using
	htab->use_plts_and_copy_relocs instead of htab->is_vxworks
	to select PLT and copy-reloc handling.  Set the alignment of
	.plt and .got.plt when allocating the first entry.  Generalize
	code to handle REL as well as RELA sections and 64-bit as well as
	32-bit GOT entries.  Complain if we find a static-only reloc
	against an externally-defined symbol and if we cannot create
	dynamic relocations for it.  Allocate copy relocs using
	mips_elf_allocate_dynamic_relocations on non-VxWorks targets.
	Set possibly_dynamic_relocs to 0 when using PLTs or copy relocs.
	Skip reserved .got.plt entries.
	(_bfd_mips_elf_always_size_sections): Use mips_elf_check_symbols
	instead of mips_elf_check_mips16_stubs to process each symbol.
	Do the traversal for relocatable objects too.
	(mips_elf_lay_out_got): Use htab->reserved_gotno instead of
	MIPS_RESERVED_GOTNO.
	(_bfd_mips_elf_size_dynamic_sections): Exclude sdynbss if it
	is empty.  Extend the DT_PLTREL, DT_JMPREL and DT_PLTRELSZ handling
	to non-VxWorks targets.  Only add DT_REL{,A}, DT_REL{,A}SZ and
	DT_REL{,A}ENT if .rel.dyn is nonempty.  Create a symbol for the
	PLT.  Allocate a nop at the end of the PLT.  Allocate DT_MIPS_PLTGOT.
	(mips_elf_create_la25_stub_info): New function.
	(_bfd_mips_elf_finish_dynamic_symbol): Write out PLT entries
	and copy relocs where necessary.  Check pointer_equality_needed.
	(mips_finish_exec_plt): New function.
	(_bfd_mips_elf_finish_dynamic_sections): Always set DT_PLTGOT
	to the beginning of htab->sgot.  Use htab->reserved_gotno instead
	of MIPS_RESERVED_GOTNO.  Assert htab->use_plts_and_copy_relocs
	instead of htab->is_vxworks for DT_PLTREL, DT_PLTRELSZ and DT_JMPREL.
	Set DT_PLTREL to DT_REL instead of DT_RELA on non-VxWorks targets.
	Use mips_finish_exec_plt to create non-VxWorks PLT headers.  Set
	DT_MIPS_PLTGOT.
	(_bfd_mips_elf_copy_indirect_symbol): Copy has_static_relocs
	from the indirect symbol to the direct symbol.  Also copy
	has_nonpic_branches for indirect symbols.
	(_bfd_mips_elf_get_target_dtag): Handle DT_MIPS_PLTGOT and
	DT_MIPS_RWPLT.
	(_bfd_mips_elf_link_hash_table_create): Initialize the new
	mips_elf_link_hash_table fields.
	(_bfd_mips_vxworks_link_hash_table_create): Set
	use_plts_and_copy_relocs to TRUE.  Use TRUE rather than 1
	when setting is_vxworks.
	(_bfd_mips_elf_use_plts_and_copy_relocs): New function.
	(_bfd_mips_elf_final_link): Call mips_elf_create_la25_stub for
	each la25_stub.
	(_bfd_mips_elf_merge_private_bfd_data): Treat dynamic objects
	as PIC.  Generalize message about linking PIC and non-PIC.
	(_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): New
	functions.
	* reloc.c: Update comment near BFD_RELOC_MIPS_JUMP_SLOT.
	* bfd-in2.h: Regenerated.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>
	    Catherine Moore  <clm@codesourcery.com>
	    Mark Shinwell  <shinwell@codesourcery.com>

	* readelf.c (get_mips_symbol_other): Handle STO_MIPS_PLT and
	STO_MIPS_PIC.
	(slurp_rela_relocs, slurp_rel_relocs): Handle MIPS ELF64 here.
	(dump_relocations, debug_apply_relocations): Don't handle it here.
	(get_mips_dynamic_type): Handle DT_MIPS_PLTGOT and DT_MIPS_RWPLT.
	(print_mips_pltgot_entry): New function.
	(process_mips_specific): Dump the PLT GOT.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* config/tc-mips.c (OPTION_CALL_NONPIC): New macro.
	(OPTION_NON_SHARED, OPTION_XGOT, OPTION_MABI, OPTION_32)
	(OPTION_N32, OPTION_64, OPTION_MDEBUG, OPTION_NO_MDEBUG)
	(OPTION_PDR, OPTION_NO_PDR, OPTION_MVXWORKS_PIC): Bump by 1.
	(md_longopts): Add -call_nonpic.
	(md_parse_option): Handle OPTION_CALL_NONPIC.
	(md_show_usage): Add -call_nonpic.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>

	* gas/mips/call-nonpic-1.s, gas/mips/call-nonpic-1.d: New test.
	* gas/mips/mips.exp: Run it.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>
	    Catherine Moore  <clm@codesourcery.com>
	    Mark Shinwell  <shinwell@codesourcery.com>

	* mips.h (STO_MIPS_PLT, ELF_ST_IS_MIPS_PLT, ELF_ST_SET_MIPS_PLT)
	(STO_MIPS_PIC, DT_MIPS_PLTGOT, DT_MIPS_RWPLT): New macros.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* emulparams/elf32bmip.sh (GOT): Define, moving .got.plt to...
	(OTHER_RELRO_SECTIONS, OTHER_READWRITE_SECTIONS): ...one of these
	two variables.
	* emulparams/elf32bmipn32-defs.sh: Likewise.
	* emultempl/mipself.em: Include ldctor.h, elf/mips.h and elfxx-mips.h.
	(is_mips_elf): New macro.
	(stub_file, stub_bfd): New variables.
	(hook_stub_info): New structure.
	(hook_in_stub): New function.
	(mips_add_stub_section): Likewise.
	(mips_create_output_section_statements): Likewise.
	(mips_before_allocation): Likewise.
	(real_func): New variable.
	(mips_for_each_input_file_wrapper): New function.
	(mips_lang_for_each_input_file): Likewise.
	(lang_for_each_input_file): Define.
	(LDEMUL_BEFORE_ALLOCATION): Likewise.
	(LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Likewise.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* ld-mips-elf/mips16-pic-3a.s,
	ld-mips-elf/mips16-pic-3b.s,
	ld-mips-elf/mips16-pic-3.dd,
	ld-mips-elf/mips16-pic-3.gd,
	ld-mips-elf/mips16-pic-3.rd,
	ld-mips-elf/mips16-pic-3.inc,
	ld-mips-elf/pic-and-nonpic-1a.s,
	ld-mips-elf/pic-and-nonpic-1b.s,
	ld-mips-elf/pic-and-nonpic-1.ld,
	ld-mips-elf/pic-and-nonpic-1.dd,
	ld-mips-elf/pic-and-nonpic-1.nd,
	ld-mips-elf/pic-and-nonpic-1-rel.dd,
	ld-mips-elf/pic-and-nonpic-1-rel.nd,
	ld-mips-elf/pic-and-nonpic-2a.s,
	ld-mips-elf/pic-and-nonpic-2b.s,
	ld-mips-elf/pic-and-nonpic-2.d,
	ld-mips-elf/pic-and-nonpic-3a.s,
	ld-mips-elf/pic-and-nonpic-3a.ld,
	ld-mips-elf/pic-and-nonpic-3a.dd,
	ld-mips-elf/pic-and-nonpic-3a.gd,
	ld-mips-elf/pic-and-nonpic-3a.sd,
	ld-mips-elf/pic-and-nonpic-3b.s,
	ld-mips-elf/pic-and-nonpic-3b.ld,
	ld-mips-elf/pic-and-nonpic-3b.ad,
	ld-mips-elf/pic-and-nonpic-3b.dd,
	ld-mips-elf/pic-and-nonpic-3b.gd,
	ld-mips-elf/pic-and-nonpic-3b.nd,
	ld-mips-elf/pic-and-nonpic-3b.pd,
	ld-mips-elf/pic-and-nonpic-3b.rd,
	ld-mips-elf/pic-and-nonpic-3b.sd,
	ld-mips-elf/pic-and-nonpic-3-error.d,
	ld-mips-elf/pic-and-nonpic-4a.s,
	ld-mips-elf/pic-and-nonpic-4b.s,
	ld-mips-elf/pic-and-nonpic-4b.ld,
	ld-mips-elf/pic-and-nonpic-4b.ad,
	ld-mips-elf/pic-and-nonpic-4b.dd,
	ld-mips-elf/pic-and-nonpic-4b.gd,
	ld-mips-elf/pic-and-nonpic-4b.nd,
	ld-mips-elf/pic-and-nonpic-4b.rd,
	ld-mips-elf/pic-and-nonpic-4b.sd,
	ld-mips-elf/pic-and-nonpic-4-error.d,
	ld-mips-elf/pic-and-nonpic-5a.s,
	ld-mips-elf/pic-and-nonpic-5b.s,
	ld-mips-elf/pic-and-nonpic-5b.ld,
	ld-mips-elf/pic-and-nonpic-5b.ad,
	ld-mips-elf/pic-and-nonpic-5b.dd,
	ld-mips-elf/pic-and-nonpic-5b.gd,
	ld-mips-elf/pic-and-nonpic-5b.nd,
	ld-mips-elf/pic-and-nonpic-5b.rd,
	ld-mips-elf/pic-and-nonpic-5b.sd,
	ld-mips-elf/pic-and-nonpic-5b.pd,
	ld-mips-elf/pic-and-nonpic-6.ld,
	ld-mips-elf/pic-and-nonpic-6-o32a.s,
	ld-mips-elf/pic-and-nonpic-6-o32b.s,
	ld-mips-elf/pic-and-nonpic-6-o32c.s,
	ld-mips-elf/pic-and-nonpic-6-o32.ad,
	ld-mips-elf/pic-and-nonpic-6-o32.dd,
	ld-mips-elf/pic-and-nonpic-6-o32.gd,
	ld-mips-elf/pic-and-nonpic-6-o32.nd,
	ld-mips-elf/pic-and-nonpic-6-o32.pd,
	ld-mips-elf/pic-and-nonpic-6-o32.rd,
	ld-mips-elf/pic-and-nonpic-6-o32.sd,
	ld-mips-elf/pic-and-nonpic-6-n32a.s,
	ld-mips-elf/pic-and-nonpic-6-n32b.s,
	ld-mips-elf/pic-and-nonpic-6-n32c.s,
	ld-mips-elf/pic-and-nonpic-6-n32.ad,
	ld-mips-elf/pic-and-nonpic-6-n32.dd,
	ld-mips-elf/pic-and-nonpic-6-n32.gd,
	ld-mips-elf/pic-and-nonpic-6-n32.nd,
	ld-mips-elf/pic-and-nonpic-6-n32.pd,
	ld-mips-elf/pic-and-nonpic-6-n32.rd,
	ld-mips-elf/pic-and-nonpic-6-n32.sd,
	ld-mips-elf/pic-and-nonpic-6-n64a.s,
	ld-mips-elf/pic-and-nonpic-6-n64b.s,
	ld-mips-elf/pic-and-nonpic-6-n64c.s,
	ld-mips-elf/pic-and-nonpic-6-n64.ad,
	ld-mips-elf/pic-and-nonpic-6-n64.dd,
	ld-mips-elf/pic-and-nonpic-6-n64.gd,
	ld-mips-elf/pic-and-nonpic-6-n64.nd,
	ld-mips-elf/pic-and-nonpic-6-n64.pd,
	ld-mips-elf/pic-and-nonpic-6-n64.rd,
	ld-mips-elf/pic-and-nonpic-6-n64.sd: New tests.
	* ld-mips-elf/mips-elf.exp: Run them.
2008-08-08 19:24:49 +00:00
Corinna Vinschen b2d3f28fda * fhandler.cc (fhandler_base::open): Use Samba workaround generally
for all remote filesystems supporting ACLs.  Change comment and
	explain why.  Refer to the discussion which led to this.
2008-08-07 16:20:03 +00:00
Brian Dessent af15c95e70 * config/i386/profile.h (mcount): Mark asms volatile. 2008-08-05 19:20:58 +00:00
Christopher Faylor 53364a1fae * dll_init.cc (dll_global_dtors): Add an additional test to avoid walking the
linked list if it is empty.
(dll_list::detach): Don't set dll_global_dtors_recorded if we aren't actually
going to record any dlls.
2008-08-05 14:26:47 +00:00
Christopher Faylor bee18f45fd Changes suggested by Dave Korn.
* dcrt0.cc (cygwin_exit): Remove (hopefully) extraneous call to
dll_global_dtors.
* dll_init.cc (dll_global_dtors): Run destructors in reverse dependency/load
order.
* dll_init.h (dll_list): Add dll_global_dtors as a friend.
2008-08-04 15:55:32 +00:00
Christopher Faylor ea8432dfb1 * cygcheck.cc (load_cygwin): Duplicate argv list since it disappears when
cygwin1.dll is unloaded.
2008-08-04 15:30:06 +00:00
Alan Modra ef432bbddf * common.h (ELFOSABI_AROS): Update comment. 2008-08-03 23:20:42 +00:00
Alan Modra f65427cd09 * mt-spu (all-ld): Update for ld Makefile changes. 2008-08-03 03:38:07 +00:00
Keith Seitz e852daa1f5 * tcl.m4 (SC_PATH_TCLCONFIG): Add some simple logic to deal
with cygwin.
        (SC_PATH_TKCONFIG): Likewise.
2008-08-02 21:20:13 +00:00
Peter Bergner b5bffab8d3 gas/
* config/tc-ppc.c (parse_cpu): Rename altivec_or_spe to retain_flags.
	Handle -mvsx and -mpower7.
	(md_show_usage): Document -mpower7 and -mvsx.
	* doc/as.texinfo (Target PowerPC): Document -mvsx.
	* doc/c-ppc.texi (PowerPC-Opts): Document -mvsx and -mpower7.

gas/testsuite/
	* gas/ppc/power7.d: New.
	* gas/ppc/power7.s: Likewise.
	* gas/ppc/ppc.exp: Run power7 test.

include/opcode/
	* ppc.h (PPC_OPCODE_VSX, PPC_OPERAND_VSR): New.

opcodes/
	* ppc-dis.c (powerpc_init_dialect): Handle power7 and vsx options.
	(print_insn_powerpc): Prepend 'vs' when printing VSX registers.
	(print_ppc_disassembler_options): Document -Mpower7 and -Mvsx.
	* ppc-opc.c (insert_xt6): New static function.
	(extract_xt6): Likewise.
	(insert_xa6): Likewise.
	(extract_xa6: Likewise.
	(insert_xb6): Likewise.
	(extract_xb6): Likewise.
	(insert_xb6s): Likewise.
	(extract_xb6s): Likewise.
	(XS6, XT6, XA6, XB6, XB6S, DM, XX3, XX3DM, XX1_MASK, XX3_MASK,
	XX3DM_MASK, PPCVSX): New.
	(powerpc_opcodes): Add opcodes "lxvd2x", "lxvd2ux", "stxvd2x",
	"stxvd2ux", "xxmrghd", "xxmrgld", "xxpermdi", "xvmovdp", "xvcpsgndp".
2008-08-02 04:38:51 +00:00
Christopher Faylor b23b171641 * dcrt0.cc (dll_crt0_1): Add a symbol denoting return from call to main().
* exceptions.cc (stack_info::walk): Stop walking the stack when we hit
_cygwin_exit_return rather than just blindly stopping when PC becomes zero.
2008-08-01 19:12:49 +00:00
Corinna Vinschen 3462d736b6 * path.cc (symlink_info::check): Handle (and explain) a special case
when accessing files matching DOS device names on SMB shares.
2008-07-31 14:48:28 +00:00
Corinna Vinschen 9fe98985b3 * spawn.cc (spawn_guts): Check constructed short pathname for being
a DOS device name and fall back to long path name, if so.
2008-07-31 14:41:19 +00:00
Paolo Bonzini 9ad2ea2fd9 2008-07-30 Paolo Bonzini <bonzini@gnu.org>
Sync with gcc:
	2008-07-30 Paolo Bonzini  <bonzini@gnu.org>

        * configure.ac: Add makefile fragments for hpux.
        * Makefile.def (flags_to_pass): Add ADA_CFLAGS.
        * Makefile.tpl (HOST_EXPORTS): Pass ADA_CFLAGS.
        * configure: Regenerate.
        * Makefile.in: Regenerate.

	2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * Makefile.tpl ($(srcdir)/configure): Update dependencies.
        * Makefile.in: Regenerate.
        * configure: Regenerate.

config:
2008-07-30  Paolo Bonzini  <bonzini@gnu.org>

	* mh-pa: New, from gcc/config/pa/x-ada.
	* mh-pa-hpux10: New, from gcc/config/pa/x-ada-hpux10.

2008-06-11  Bernhard Fischer  <aldot@gcc.gnu.org>

        * tls.m4: Fix typos.
2008-07-30 15:03:57 +00:00
Corinna Vinschen d79a78e5c8 * fhandler_disk_file.cc (fhandler_base::fstat_by_name): Check for
file systems incapable of handling FileIdBothDirectoryInformation
	correctly.
	(fhandler_disk_file::opendir): Ditto.
	* path.cc (fs_info::update): Always clear at the start.
	Rearrange to make certain tests only on non-Samba, non-NFS remote
	drives.
	Add test for file systems known to be incapable of handling
	FileIdBothDirectoryInformation correctly.  Right now that's just
	"UNIXFS".
	* path.h (struct fs_info): Add has_buggy_fileid_dirinfo flag and
	accessor methods.
	(class path_conv): Add has_buggy_fileid_dirinfo method.
2008-07-30 14:41:59 +00:00
Corinna Vinschen b54881352d * sec_auth.cc (extract_nt_dom_user): Return domain and user name as
WCHAR.
	(cygwin_logon_user): Accommodate above change.  Convert password to
	WCHAR and call LogonUserW.
	* external.cc (cygwin_internal): Accommodate above change.
	* security.h (extract_nt_dom_user): Change prototype accordingly.
2008-07-30 12:10:20 +00:00
Alan Modra 79ea8bbb10 include/opcode/
* ppc.h (PPC_OPCODE_405): Define.
	(PPC_OPERAND_FSL, PPC_OPERAND_FCR, PPC_OPERAND_UDI): Define.
gas/
	* config/tc-ppc.c (parse_cpu): Separate handling of -m403/405.
	(md_show_usage): Likewise.
opcodes/
	* ppc-dis.c (print_insn_powerpc): Disassemble FSL/FCR/UDI fields.
	* ppc-opc.c (powerpc_operands): Add Xilinx APU related operands.
	(insert_sprg, PPC405): Use PPC_OPCODE_405.
	(powerpc_opcodes): Add Xilinx APU related opcodes.
2008-07-30 06:29:21 +00:00
Christopher Faylor e3e942ac00 * Makefile.in: Link cygcheck with -lntdll even without mingw-zlib. 2008-07-30 06:07:42 +00:00
Christopher Faylor a010e6abed * cygwin.din (_getutline): Remove.
* lib/bsdlib.cc (login): Make argument const as per linux.
(logout): Ditto.
* syscalls.cc (getutid): Ditto.
(getutline): Ditto.
(pututline): Ditto.
(getutxent): Add comment mentioning non-thread-safety.
(getutxid): Ditto.
(getutxline): Ditto.
(pututxline): Ditto.
* sys/utmp.h: Declare arguments to various functions as const as per linux.
Remove bogus _getutline definition.
2008-07-30 04:58:24 +00:00
Christopher Faylor dbfc6f0e78 (missing changelog entry)
* include/cygwin/version.h: Add comment indicating that current API number bump
also has another consequence.
2008-07-30 01:37:55 +00:00
Christopher Faylor f5b18cbef7 * include/cygwin/version.h: Add comment indicating that current API number bump
also has another consequence.
2008-07-29 14:07:21 +00:00
Corinna Vinschen f9afd0ced7 * Makefile.in (DLL_OFILES): Remove v8 regexp files.
(OBSOLETE_FUNCTIONS): Remove v8 regexp functions.
	(NEW_FUNCTIONS): Remove POSIX regex functions.
	* cygwin.din: Export POSIX regex functions with their correct symbol
	name.  Export with posix_ prefix for backward compatibility.
	* syscalls.cc (regfree): Remove ancient fake function.
	* regex/regex.h: Remove renaming regex functions within Cygwin.
	* regexp/*: Remove.
	* include /cygwin/version,.h: Bump API minor number.
2008-07-29 10:40:37 +00:00
Keith Marshall f2cb69fd8e Replace __mingw_snprintf() with new generic family implementation; likewise, replace __mingw_vsnprintf(). 2008-07-28 23:24:20 +00:00
Keith Marshall 8c7a3134dd Lay foundations for new printf() function family implementation. 2008-07-28 22:57:43 +00:00
Christopher Faylor 038af33480 * dcrt0.cc (dll_crt0_0): Remove calling malloc_init and
user_shared_initialize_1 from here.
(dll_crt0_1): Remove dynamically_loaded check.  Just call malloc_init and
user_shared_initialize unconditionally.
* shared.cc (user_shared_create): Rename from user_shared_initialize.
(user_shared_initialize): Rename from user_shared_initialize_1.  Move complete
user_shared content initialization code here from user_shared_create.
* syscalls.cc (seteuid32): Remove call to user_shared_initialize_1.  That is
implied by the "true" argument to user_shared_create().
2008-07-27 22:31:48 +00:00
Christopher Faylor b58e5f427a * mount.cc (mount_info::init): Add location where we're looking for fstab to
temporary message.
* lib/cygwin_crt0.c (cygwin_crt0): Simplify by eliminating accommodations for
ancient cygwin DLLs.
* lib/crt0.h: Include <windows.h> directly since it is needed.
2008-07-27 16:59:07 +00:00
Christopher Faylor 34aa62035b * cygcheck.cc (load_cygwin): Free the cygwin dll after we're done with it. 2008-07-27 14:53:42 +00:00
Christopher Faylor 904413e731 * shared_info.h (shared_destroy): Declare.
* shared.cc (shared_destroy): Define new function to destroy shared memory
regions.
* init.cc (dll_entry): Call shared_destroy when dll detaches from the process.
2008-07-27 14:52:46 +00:00
Corinna Vinschen bfd2b1c930 * fhandler_socket.cc (fhandler_socket::send_internal): Send never more
then 64K bytes at once.  For blocking sockets, loop until entire data
	has been sent or an error occurs.
	(fhandler_socket::sendto): Drop code which sends on 64K bytes.
	(fhandler_socket::sendmsg): Ditto.
2008-07-27 10:20:49 +00:00
Christopher Faylor 34cc372abe * fhandler_tty.cc (fhandler_pty_master::setup): Reorganize so that all
operations for each end of the pipe are grouped together.
2008-07-26 19:35:21 +00:00
Alan Modra d9f2119e32 Support PowerPC single-precision float. 2008-07-26 13:10:47 +00:00