aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2005-06-01 04:04:19 +0000
committerZack Weinberg <zackw@panix.com>2005-06-01 04:04:19 +0000
commita359509ed39f8affc5f3e995b57d7611edfbb59d (patch)
treecea3b01c4597471699599bfb337a20439ee2071b /ld/emultempl
parent7b8f476a17b961ff3d26cf02c8ea0d1da26ff5e6 (diff)
downloadgdb-a359509ed39f8affc5f3e995b57d7611edfbb59d.zip
gdb-a359509ed39f8affc5f3e995b57d7611edfbb59d.tar.gz
gdb-a359509ed39f8affc5f3e995b57d7611edfbb59d.tar.bz2
ld:
* ldlang.c (entry_symbol_default): New file-scope global. (lang_finish): Use it, not a hardwired "start". (lang_default_entry): Set it. * ldlang.h: Declare lang_default_entry. * emultempl/beos.em, emultempl/pe.em: Use lang_default_entry, not lang_add_entry, to override default entry point symbol. ld/testsuite: * ld-scripts/align.exp: Mark align1 XFAIL on PECOFF targets. * ld-scripts/data.exp: Mark data UNSUPPORTED on a.out targets. * ld-scripts/provide.exp, ld-scripts/size.exp: Mark all tests UNSUPPORTED on a.out targets. Tidy.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/beos.em19
-rw-r--r--ld/emultempl/pe.em8
2 files changed, 6 insertions, 21 deletions
diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em
index 24d4c44..4e06372 100644
--- a/ld/emultempl/beos.em
+++ b/ld/emultempl/beos.em
@@ -216,23 +216,8 @@ set_pe_subsystem (void)
set_pe_name ("__subsystem__", v[i].value);
/* If the subsystem is windows, we use a different entry
- point. We also register the entry point as an undefined
- symbol. from lang_add_entry() The reason we do
- this is so that the user
- doesn't have to because they would have to use the -u
- switch if they were specifying an entry point other than
- _mainCRTStartup. Specifically, if creating a windows
- application, entry point _WinMainCRTStartup must be
- specified. What I have found for non console
- applications (entry not _mainCRTStartup) is that the .obj
- that contains mainCRTStartup is brought in since it is
- the first encountered in libc.lib and it has other
- symbols in it which will be pulled in by the link
- process. To avoid this, adding -u with the entry point
- name specified forces the correct .obj to be used. We
- can avoid making the user do this by always adding the
- entry point name as an undefined symbol. */
- lang_add_entry (v[i].entry, 1);
+ point. */
+ lang_default_entry (v[i].entry);
return;
}
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 1336a31..bd6f191 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -139,9 +139,9 @@ gld_${EMULATION_NAME}_before_parse (void)
#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
- lang_add_entry ("WinMainCRTStartup", FALSE);
+ lang_default_entry ("WinMainCRTStartup");
#else
- lang_add_entry ("_WinMainCRTStartup", FALSE);
+ lang_default_entry ("_WinMainCRTStartup");
#endif
#endif
#endif
@@ -457,7 +457,7 @@ set_pe_subsystem (void)
{
char *alc_entry;
- /* lang_add_entry expects its argument to be permanently
+ /* lang_default_entry expects its argument to be permanently
allocated, so we don't free this string. */
alc_entry = xmalloc (strlen (initial_symbol_char)
+ strlen (entry)
@@ -467,7 +467,7 @@ set_pe_subsystem (void)
entry = alc_entry;
}
- lang_add_entry (entry, FALSE);
+ lang_default_entry (entry);
return;
}