aboutsummaryrefslogtreecommitdiff
path: root/ld/configure
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-05-21 12:01:37 +0000
committerNick Clifton <nickc@redhat.com>2008-05-21 12:01:37 +0000
commit7fb9f789e396b4653bba0ff56d786f5470a870c9 (patch)
treebb01440a6b01700909481064c73ebfa0ee9be648 /ld/configure
parent90b5b1a5e42372c0fde6186d08235aa4746d9707 (diff)
downloadgdb-7fb9f789e396b4653bba0ff56d786f5470a870c9.zip
gdb-7fb9f789e396b4653bba0ff56d786f5470a870c9.tar.gz
gdb-7fb9f789e396b4653bba0ff56d786f5470a870c9.tar.bz2
Multi-GOT support for m68k.
bfd/ * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key, glist): New fields. (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry, struct elf_m68k_got, struct elf_m68k_bfd2got_entry, struct elf_m68k_multi_got): New data structures. (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p, allow_multigot_p, multi_got_): New fields. (elf_m68k_multi_got): New macro. (elf_m68k_link_hash_newfunc): Initialize new fields of struct elf_m68k_link_hash_entry. (elf_m68k_link_hash_table_create): Initialize new fields of struct elf_m68k_link_hash_table. (elf_m68k_link_hash_table_free): New static function implementing hook. (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New static functions for struct elf_m68k_got. (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash, elf_m68k_got_entry_eq): New static functions for struct elf_m68k_got_entry. (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT, ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros. (enum elf_m68k_get_entry_howto): New enum. (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type, elf_m68k_remove_got_entry_type): New static functions for struct elf_m68k_got_entry. (elf_m68k_add_entry_to_got): New static function. (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq, elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static functions for struct elf_m68k_bfd2got_entry. (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1, elf_m68k_can_merge_gots): New traversal. (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1, elf_m68k_merge_gots): Ditto. (struct elf_m68k_finalize_got_offsets_arg, elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto. (struct elf_m68k_partition_multi_got_arg, elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1, elf_m68k_partition_multi_got): Ditto. (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static functions. (elf_m68k_copy_indirect_symbol): New static function implementing a hook. (elf_m68k_check_relocs): Update to add entries to multi-GOT. (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT. (elf_m68k_always_size_sections): Assign BFDs to GOTs. (elf_m68k_relocate_section): Update to properly handle GOT relocations. (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries of a global symbol. (bfd_elf_m68k_set_target_options): New function. (bfd_elf32_bfd_link_hash_table_free): Define hook. (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link to skip generic calculation of GOT offsets. (elf_backend_copy_indirect_symbol): Define hook. * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function. * bfd-in2.h: Regenerate. ld/ * configure.in (--enable-got): New option. Handle it. * configure: Regenerate. * config.in: Regenerate. * emultempl/m68kelf.em: (got_handling_target_default): New shell variable. (GOT_HANDLING_TARGET_DEFAULT): New macro. (GOT_HANDLING_DEFAULT): New macro. Initialize it from configure option if one was given. (got_handling): New static variable. (elf_m68k_create_output_section_statements): New static function implementing hook. (PARSE_AND_LIST_PROLOGUE): Define shell variable. (OPTION_GOT): New macro. (PARSE_AND_LIST_LONGOPTS): Define shell variable. Specify --got option. (got): New linker option. (PARSE_AND_LIST_OPTIONS): Define shell variable. Print help string for --got option. (PARSE_AND_LIST_ARGS_CASES): Define shell variable. Handle --got option. * ld.texinfo: Document --got=<type> option. * gen-doc.texi: Add M68K. * NEWS: Mention the new feature. ld/testsuite/ * ld-m68k/got-12.s: New file. * ld-m68k/got-13.s: New file. * ld-m68k/got-14.s: New file. * ld-m68k/got-15.s: New file. * ld-m68k/got-34.s: New file. * ld-m68k/got-35.s: New file. * ld-m68k/got-single-12-ok.d: New dump test. * ld-m68k/got-single-13-er.d: New dump test. * ld-m68k/got-negative-14-ok.d: New dump test. * ld-m68k/got-negative-15-er.d: New dump test. * ld-m68k/got-negative-12-13-14-34-ok.d: New dump test. * ld-m68k/got-negative-12-13-14-35-er.d: New dump test. * ld-m68k/got-multigot-14-ok.d: New dump test. * ld-m68k/got-multigot-15-er.d: New dump test. * ld-m68k/got-multigot-12-13-14-34-35-ok.d: New dump test. * ld-m68k/xgot-15.s: New source. * ld-m68k/got-xgot-15-ok.d: New test. * ld-m68k/got-xgot-12-13-14-15-34-35-ok.d: New test. * ld-m68k/m68k.exp: Run new tests.
Diffstat (limited to 'ld/configure')
-rwxr-xr-xld/configure73
1 files changed, 59 insertions, 14 deletions
diff --git a/ld/configure b/ld/configure
index e2a8199..37e158d 100755
--- a/ld/configure
+++ b/ld/configure
@@ -1003,6 +1003,8 @@ Optional Features:
--enable-dependency-tracking do not reject slow dependency extractors
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
+ --enable-got=<type> GOT handling scheme (target, single, negative,
+ multigot)
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings
--enable-shared[=PKGS]
@@ -3321,6 +3323,49 @@ fi;
+# Check whether --enable-got or --disable-got was given.
+if test "${enable_got+set}" = set; then
+ enableval="$enable_got"
+ case "${enableval}" in
+ target | single | negative | multigot) got_handling=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-got option" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-got option" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ got_handling=target
+fi;
+
+case "${got_handling}" in
+ target)
+
+cat >>confdefs.h <<\_ACEOF
+#define GOT_HANDLING_DEFAULT GOT_HANDLING_TARGET_DEFAULT
+_ACEOF
+ ;;
+ single)
+
+cat >>confdefs.h <<\_ACEOF
+#define GOT_HANDLING_DEFAULT GOT_HANDLING_SINGLE
+_ACEOF
+ ;;
+ negative)
+
+cat >>confdefs.h <<\_ACEOF
+#define GOT_HANDLING_DEFAULT GOT_HANDLING_NEGATIVE
+_ACEOF
+ ;;
+ multigot)
+
+cat >>confdefs.h <<\_ACEOF
+#define GOT_HANDLING_DEFAULT GOT_HANDLING_MULTIGOT
+_ACEOF
+ ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${got_handling} for --enable-got option" >&5
+echo "$as_me: error: bad value ${got_handling} for --enable-got option" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
@@ -4761,13 +4806,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:4764: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:4809: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:4767: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:4812: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:4770: output\"" >&5)
+ (eval echo "\"\$as_me:4815: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -5822,7 +5867,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5825 "configure"' > conftest.$ac_ext
+ echo '#line 5870 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -6922,11 +6967,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6925: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6970: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6929: \$? = $ac_status" >&5
+ echo "$as_me:6974: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7244,11 +7289,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7247: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7292: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7251: \$? = $ac_status" >&5
+ echo "$as_me:7296: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7349,11 +7394,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7352: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7397: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7356: \$? = $ac_status" >&5
+ echo "$as_me:7401: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -7404,11 +7449,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7407: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7452: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7411: \$? = $ac_status" >&5
+ echo "$as_me:7456: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10201,7 +10246,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10204 "configure"
+#line 10249 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10301,7 +10346,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10304 "configure"
+#line 10349 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H