This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [BZ#14767] Remove tests for have-initfini-array in elf/Makefile


On Monday, October 29, 2012 16:17:22 Andreas Schwab wrote:
> Andreas Jaeger <aj@suse.com> writes:
> > On Monday, October 29, 2012 00:18:53 Andreas Schwab wrote:
> >> Andreas Jaeger <aj@suse.com> writes:
> >> > I'm missing something here - the patch helps, why do is it needed
> >> > for
> >> > tst-array1.c and tst-array2dep.c but not for the other tst-array
> >> > files?
> >> 
> >> They don't define a constructor.
> > 
> > Ok. So, is my patch the right solution?
> 
> Looks good to me (though you don't need the used attribute since the
> variables are global).

You're right.

Here's what I'll commit later,

Andreas

2012-10-27  Andreas Jaeger  <aj@suse.de>

	* elf/tst-array1.c (fini_array): Make writeable so that it can be
	merged with constructor/destructor.
        (init_array): Likewise.
	* elf/tst-array2dep.c (fini_array): Likewise.
	(init_array): Likewise.

diff --git a/elf/tst-array1.c b/elf/tst-array1.c
index 4d78db6..ca9bdf4 100644
--- a/elf/tst-array1.c
+++ b/elf/tst-array1.c
@@ -60,7 +60,7 @@ init_2 (void)
   write (STDOUT_FILENO, "init array 2\n", 13);
 }
 
-void (*const init_array []) (void)
+void (*init_array []) (void)
      __attribute__ ((section (".init_array"), aligned (sizeof (void *)))) =
 {
   &init_0,
@@ -86,7 +86,7 @@ fini_2 (void)
   write (STDOUT_FILENO, "fini array 2\n", 13);
 }
 
-void (*const fini_array []) (void)
+void (*fini_array []) (void)
      __attribute__ ((section (".fini_array"), aligned (sizeof (void *)))) =
 {
   &fini_0,
diff --git a/elf/tst-array2dep.c b/elf/tst-array2dep.c
index e1596b5..2812761 100644
--- a/elf/tst-array2dep.c
+++ b/elf/tst-array2dep.c
@@ -34,7 +34,7 @@ init_2 (void)
   write (STDOUT_FILENO, "DSO init array 2\n", 17);
 }
 
-void (*const init_array []) (void)
+void (*init_array []) (void)
      __attribute__ ((section (".init_array"), aligned (sizeof (void *)))) =
 {
   &init_0,
@@ -60,7 +60,7 @@ fini_2 (void)
   write (STDOUT_FILENO, "DSO fini array 2\n", 17);
 }
 
-void (*const fini_array []) (void)
+void (*fini_array []) (void)
      __attribute__ ((section (".fini_array"), aligned (sizeof (void *)))) =
 {
   &fini_0,

-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]