On Fri, 2009-11-06 at 20:08 +0100, Danny Backx wrote:
> On Fri, 2009-11-06 at 19:50 +0100, Vincent R. wrote:
> > >> I have also applied another patch that I think is supposed to fill IAT
> > >> value and I have recompiled binutils but when I clean/recompile my
> > sample
> > >> application I cannot see any differences in binary code, IAT is still
> > >> NULL.
> > >> Do I need to also recompile w32api/mingw ?
> > >
> > > I'm not clear exactly which value you're referring to here, so you'd
> > > better
> > > show me your patch. I wouldn't expect it to depend on the library
> > though.
> > >
> >
> > see attachment
>
> Ah, that patch :-)
>
> This patches _bfd_XXi_final_link_postscript which is not called in my
> examples. What does get called is coff_arm_final_link_postscript (in
> bfd/coff_arm.c).
>
> I don't understand why.
This can be worked around by :
pavilion: {278} svn diff libpei.h
Index: libpei.h
===================================================================
--- libpei.h (revision 1384)
+++ libpei.h (working copy)
@@ -323,9 +323,13 @@
#define coff_swap_aouthdr_out _bfd_XXi_swap_aouthdr_out
#define coff_swap_scnhdr_out _bfd_XXi_swap_scnhdr_out
-#ifndef coff_final_link_postscript
+#ifdef coff_final_link_postscript
+#undef coff_final_link_postscript
+#endif
#define coff_final_link_postscript _bfd_XXi_final_link_postscript
-#endif
+// #ifndef coff_final_link_postscript
+// #define coff_final_link_postscript _bfd_XXi_final_link_postscript
+// #endif
void _bfd_XXi_swap_sym_in (bfd *, void *, void *);
unsigned _bfd_XXi_swap_sym_out (bfd *, void *, void *);
pavilion: {279}
and then
pavilion: {281} svn diff coff-arm.c
Index: coff-arm.c
===================================================================
--- coff-arm.c (revision 1384)
+++ coff-arm.c (working copy)
@@ -2507,11 +2507,13 @@
|| sub == coff_arm_hash_table
(info->info)->bfd_of_glue_owner);
}
+#if 0
static bfd_boolean
coff_arm_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED,
struct coff_final_link_info * pfinfo)
{
struct coff_arm_link_hash_table * globals;
+ fprintf(stderr, "Yow coff_arm_final_link_postscript\n");
globals = coff_arm_hash_table (pfinfo->info);
@@ -2527,6 +2529,7 @@
return bfd_arm_update_notes (abfd, ARM_NOTE_SECTION);
}
+#endif
#ifndef bfd_pe_print_pdata
#define bfd_pe_print_pdata NULL
pavilion: {282}
But still the IAT remains NULL. I suspect that the code that Kai also
patched in ld/emultempl/pep.em and scripttempl/armcoff.sc and
scripttempl/pep.sc might be related.
Can anyone tell me how to interpret the ld scripts ? I haven't the
faintest idea of how they work.
Danny
--
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Cegcc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cegcc-devel