mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 16:38:05 +08:00
* lib/ld-lib.exp: Comment cleanups.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2006-04-05 Ben Elliston <bje@au.ibm.com>
|
||||||
|
|
||||||
|
* lib/ld-lib.exp: Comment cleanups.
|
||||||
|
|
||||||
2006-03-27 Richard Sandiford <richard@codesourcery.com>
|
2006-03-27 Richard Sandiford <richard@codesourcery.com>
|
||||||
|
|
||||||
* ld-mips-elf/tls-hidden3a.s, ld-mips-elf/tls-hidden3b.s,
|
* ld-mips-elf/tls-hidden3a.s, ld-mips-elf/tls-hidden3b.s,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Support routines for LD testsuite.
|
# Support routines for LD testsuite.
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||||
# 2004, 2005 Free Software Foundation, Inc.
|
# 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; you can redistribute it and/or modify
|
# This file is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -15,10 +15,8 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#
|
|
||||||
#
|
# Extract and print the version number of ld.
|
||||||
# default_ld_version
|
|
||||||
# extract and print the version number of ld
|
|
||||||
#
|
#
|
||||||
proc default_ld_version { ld } {
|
proc default_ld_version { ld } {
|
||||||
global host_triplet
|
global host_triplet
|
||||||
@ -36,9 +34,7 @@ proc default_ld_version { ld } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
# Link an object using relocation.
|
||||||
# default_ld_relocate
|
|
||||||
# link an object using relocation
|
|
||||||
#
|
#
|
||||||
proc default_ld_relocate { ld target objects } {
|
proc default_ld_relocate { ld target objects } {
|
||||||
global HOSTING_EMU
|
global HOSTING_EMU
|
||||||
@ -62,7 +58,7 @@ proc default_ld_relocate { ld target objects } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Check to see if ld is being invoked with a non-endian output format
|
# Check to see if ld is being invoked with a non-endian output format
|
||||||
|
#
|
||||||
proc is_endian_output_format { object_flags } {
|
proc is_endian_output_format { object_flags } {
|
||||||
|
|
||||||
if {[string match "*-oformat binary*" $object_flags] || \
|
if {[string match "*-oformat binary*" $object_flags] || \
|
||||||
@ -86,7 +82,7 @@ proc is_endian_output_format { object_flags } {
|
|||||||
# the site.exp file will include the switch "-mbig-endian"
|
# the site.exp file will include the switch "-mbig-endian"
|
||||||
# (rather than "big-endian") which is not detected by proc
|
# (rather than "big-endian") which is not detected by proc
|
||||||
# process_multilib_options.
|
# process_multilib_options.
|
||||||
|
#
|
||||||
proc big_or_little_endian {} {
|
proc big_or_little_endian {} {
|
||||||
|
|
||||||
if [board_info [target_info name] exists multilib_flags] {
|
if [board_info [target_info name] exists multilib_flags] {
|
||||||
@ -110,9 +106,7 @@ proc big_or_little_endian {} {
|
|||||||
return $flags
|
return $flags
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
# Link a program using ld.
|
||||||
# default_ld_link
|
|
||||||
# link a program using ld
|
|
||||||
#
|
#
|
||||||
proc default_ld_link { ld target objects } {
|
proc default_ld_link { ld target objects } {
|
||||||
global HOSTING_EMU
|
global HOSTING_EMU
|
||||||
@ -147,9 +141,7 @@ proc default_ld_link { ld target objects } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
# Link a program using ld, without including any libraries.
|
||||||
# default_ld_simple_link
|
|
||||||
# link a program using ld, without including any libraries
|
|
||||||
#
|
#
|
||||||
proc default_ld_simple_link { ld target objects } {
|
proc default_ld_simple_link { ld target objects } {
|
||||||
global host_triplet
|
global host_triplet
|
||||||
@ -197,9 +189,7 @@ proc default_ld_simple_link { ld target objects } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
# Compile an object using cc.
|
||||||
# default_ld_compile
|
|
||||||
# compile an object using cc
|
|
||||||
#
|
#
|
||||||
proc default_ld_compile { cc source object } {
|
proc default_ld_compile { cc source object } {
|
||||||
global CFLAGS
|
global CFLAGS
|
||||||
@ -272,9 +262,7 @@ proc default_ld_compile { cc source object } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
# Assemble a file.
|
||||||
# default_ld_assemble
|
|
||||||
# assemble a file
|
|
||||||
#
|
#
|
||||||
proc default_ld_assemble { as source object } {
|
proc default_ld_assemble { as source object } {
|
||||||
global ASFLAGS
|
global ASFLAGS
|
||||||
@ -302,9 +290,7 @@ proc default_ld_assemble { as source object } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
# Run nm on a file, putting the result in the array nm_output.
|
||||||
# default_ld_nm
|
|
||||||
# run nm on a file, putting the result in the array nm_output
|
|
||||||
#
|
#
|
||||||
proc default_ld_nm { nm nmflags object } {
|
proc default_ld_nm { nm nmflags object } {
|
||||||
global NMFLAGS
|
global NMFLAGS
|
||||||
@ -355,9 +341,7 @@ proc default_ld_nm { nm nmflags object } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
# True if the object format is known to be ELF.
|
||||||
# is_elf_format
|
|
||||||
# true if the object format is known to be ELF
|
|
||||||
#
|
#
|
||||||
proc is_elf_format {} {
|
proc is_elf_format {} {
|
||||||
if { ![istarget *-*-sysv4*] \
|
if { ![istarget *-*-sysv4*] \
|
||||||
@ -393,9 +377,8 @@ proc is_elf_format {} {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# True if the object format is known to be 64-bit ELF.
|
||||||
#
|
#
|
||||||
# is_elf64
|
|
||||||
# true if the object format is known to be 64bit ELF
|
|
||||||
proc is_elf64 { binary_file } {
|
proc is_elf64 { binary_file } {
|
||||||
global READELF
|
global READELF
|
||||||
global READELFFLAGS
|
global READELFFLAGS
|
||||||
@ -419,9 +402,8 @@ proc is_elf64 { binary_file } {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# True if the object format is known to be a.out.
|
||||||
#
|
#
|
||||||
# is_aout_format
|
|
||||||
# true if the object format is known to be aout
|
|
||||||
proc is_aout_format {} {
|
proc is_aout_format {} {
|
||||||
if { [istarget *-*-*\[ab\]out*] \
|
if { [istarget *-*-*\[ab\]out*] \
|
||||||
|| [istarget *-*-linux*oldld*] \
|
|| [istarget *-*-linux*oldld*] \
|
||||||
@ -449,9 +431,7 @@ proc is_aout_format {} {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
# True if the object format is known to be PE COFF.
|
||||||
# is_pecoff_format
|
|
||||||
# true if the object format is known to be PECOFF
|
|
||||||
#
|
#
|
||||||
proc is_pecoff_format {} {
|
proc is_pecoff_format {} {
|
||||||
if { ![istarget *-*-mingw32*] \
|
if { ![istarget *-*-mingw32*] \
|
||||||
@ -463,11 +443,9 @@ proc is_pecoff_format {} {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
# Compares two files line-by-line.
|
||||||
# simple_diff
|
# Returns differences if exist.
|
||||||
# compares two files line-by-line
|
# Returns null if file(s) cannot be opened.
|
||||||
# returns differences if exist
|
|
||||||
# returns null if file(s) cannot be opened
|
|
||||||
#
|
#
|
||||||
proc simple_diff { file_1 file_2 } {
|
proc simple_diff { file_1 file_2 } {
|
||||||
global target
|
global target
|
||||||
@ -630,7 +608,7 @@ proc simple_diff { file_1 file_2 } {
|
|||||||
# `regexp_diff' to compare the output of the dumping tool against the
|
# `regexp_diff' to compare the output of the dumping tool against the
|
||||||
# regexps in FILE.d. `regexp_diff' is defined later in this file; see
|
# regexps in FILE.d. `regexp_diff' is defined later in this file; see
|
||||||
# further comments there.
|
# further comments there.
|
||||||
|
#
|
||||||
proc run_dump_test { name } {
|
proc run_dump_test { name } {
|
||||||
global subdir srcdir
|
global subdir srcdir
|
||||||
global OBJDUMP NM AS OBJCOPY READELF LD
|
global OBJDUMP NM AS OBJCOPY READELF LD
|
||||||
@ -851,7 +829,7 @@ proc run_dump_test { name } {
|
|||||||
# redirected, exec *always* returns failure, regardless of the
|
# redirected, exec *always* returns failure, regardless of the
|
||||||
# program exit code. Thankfully, we can retrieve the true
|
# program exit code. Thankfully, we can retrieve the true
|
||||||
# return status from a special variable. Redirection would
|
# return status from a special variable. Redirection would
|
||||||
# cause a tcl-specific message to be appended, and we'd rather
|
# cause a Tcl-specific message to be appended, and we'd rather
|
||||||
# not deal with that if we can help it.
|
# not deal with that if we can help it.
|
||||||
global errorCode
|
global errorCode
|
||||||
if { [lindex $errorCode 0] == "NONE" } {
|
if { [lindex $errorCode 0] == "NONE" } {
|
||||||
@ -1099,12 +1077,12 @@ proc file_contents { filename } {
|
|||||||
# 0:name 1:ld options 2:assembler options
|
# 0:name 1:ld options 2:assembler options
|
||||||
# 3:filenames of assembler files 4: action and options. 5: name of output file
|
# 3:filenames of assembler files 4: action and options. 5: name of output file
|
||||||
# 6:compiler flags (optional)
|
# 6:compiler flags (optional)
|
||||||
|
#
|
||||||
# Actions:
|
# Actions:
|
||||||
# objdump: Apply objdump options on result. Compare with regex (last arg).
|
# objdump: Apply objdump options on result. Compare with regex (last arg).
|
||||||
# nm: Apply nm options on result. Compare with regex (last arg).
|
# nm: Apply nm options on result. Compare with regex (last arg).
|
||||||
# readelf: Apply readelf options on result. Compare with regex (last arg).
|
# readelf: Apply readelf options on result. Compare with regex (last arg).
|
||||||
|
#
|
||||||
proc run_ld_link_tests { ldtests } {
|
proc run_ld_link_tests { ldtests } {
|
||||||
global ld
|
global ld
|
||||||
global as
|
global as
|
||||||
|
Reference in New Issue
Block a user