This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld -e number makes an entry in symbol table
On Thu, Sep 10, 2009 at 11:37 PM, Alan Modra <amodra@bigpond.net.au> wrote:
> On Fri, Sep 11, 2009 at 10:54:15AM +0930, Alan Modra wrote:
>> Good, that's what I think too. ?The ldlang_add_undef should happen
>> in main just before the ldemul_after_parse call, and be just like the
>> existing calls in pe.em/pep.em, ie. don't add the undef when
>> relocatable, and of course not for -e <number>.
>
> Even better, move the ldlang_add_undef call into ldemul_after_parse so
> that targets can override this action.
>
> This patch does cause some testsuite failures because we don't bother
> defining entry symbols in many of our tests. ?I'll commit it after
> fixing all the failures that show up.
>
> ? ? ? ?PR ld/6766
> ? ? ? ?* lexsup.c (parse_args <-e>): Revert 2009-03-18 change.
> ? ? ? ?* ldemul.c (after_parse_default): Add entry symbol as undef.
> ? ? ? ?* emultempl/alphaelf.em (alpha_after_parse): Call after_parse_default.
> ? ? ? ?* emultempl/cr16elf.em (cr16elf_after_parse): Likewise.
> ? ? ? ?* emultempl/crxelf.em (crxelf_after_parse): Likewise.
> ? ? ? ?* emultempl/hppaelf.em (hppaelf_after_parse): Likewise.
> ? ? ? ?* emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse): Likewise.
> ? ? ? ?* emultempl/pe.em (gld_${EMULATION_NAME}_after_parse): Call
> ? ? ? ?after_parse_default and delete now duplicate code.
> ? ? ? ?* emultempl/pep.em (gld_${EMULATION_NAME}_after_parse): Likewise.
>
I am checking in this testcase.
Thanks.
H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog (revision 6828)
+++ ChangeLog (working copy)
@@ -1,3 +1,7 @@
+2009-09-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-undefined/entry-7.d: New.
+
2009-09-13 Richard Sandiford <rdsandiford@googlemail.com>
* ld-mips-elf/eh-frame1-n32.d: Change "the section \.eh_frame"
Index: ld-undefined/entry-7.d
===================================================================
--- ld-undefined/entry-7.d (revision 0)
+++ ld-undefined/entry-7.d (revision 0)
@@ -0,0 +1,5 @@
+#name: --entry 0x0
+#source: dummy.s
+#ld: --entry 0x0
+#nm: -u
+