This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: ld/2218: Weak undefined symbol doesn't work properly with PIE
On Thu, Feb 23, 2006 at 02:01:54PM -0800, James E Wilson wrote:
> On Mon, 2006-02-20 at 12:09, H. J. Lu wrote:
> > I am checking this patch to test weak undefined data. I will
> > fix ia64 backend.
>
> > +extern int undef_data (void);
> > +int (*ptr_to_data)(void) = undef_data;
>
> Except this testcase doesn't test data. It tests a function. It is
> identical to the earlier weakundef.c testcase, with the function name
> changed from undef_func to undef_data.
>
> I think you meant to make undef_data a variable instead of a function.
> That would make sense.
Ooops. It was a typo. I am checking in this to fix it.
Thanks.
H.J.
---
2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
* ld-pie/weakundef-data.c: Fix the typo.
--- ld/testsuite/ld-pie/weakundef-data.c.foo 2006-02-20 12:11:00.000000000 -0800
+++ ld/testsuite/ld-pie/weakundef-data.c 2006-02-23 14:16:06.000000000 -0800
@@ -2,8 +2,8 @@
#pragma weak undef_data
-extern int undef_data (void);
-int (*ptr_to_data)(void) = undef_data;
+extern int undef_data;
+int *ptr_to_data = &undef_data;
int
main (void)