mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-08 19:31:06 +08:00
re PR middle-end/47610 (cp-demangle.c:1970:1: error: cplus_demangle_builtin_types causes a section type conflict)
PR middle-end/47610 * varasm.c (default_section_type_flags): If decl is NULL, and name is .data.rel.ro or .data.rel.ro.local, set SECTION_RELRO bit. * gcc.dg/pr47610.c: New test. From-SVN: r169855
This commit is contained in:
parent
4a9b1f8edc
commit
c42c09fc41
@ -1,3 +1,10 @@
|
||||
2011-02-05 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/47610
|
||||
* varasm.c (default_section_type_flags): If decl is NULL,
|
||||
and name is .data.rel.ro or .data.rel.ro.local, set SECTION_RELRO
|
||||
bit.
|
||||
|
||||
2011-02-05 Jie Zhang <jie@codesourcery.com>
|
||||
|
||||
PR debug/42631
|
||||
|
@ -1,3 +1,8 @@
|
||||
2011-02-05 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/47610
|
||||
* gcc.dg/pr47610.c: New test.
|
||||
|
||||
2011-02-05 Jie Zhang <jie@codesourcery.com>
|
||||
|
||||
PR debug/42631
|
||||
|
8
gcc/testsuite/gcc.dg/pr47610.c
Normal file
8
gcc/testsuite/gcc.dg/pr47610.c
Normal file
@ -0,0 +1,8 @@
|
||||
/* PR middle-end/47610 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fpic" { target fpic } } */
|
||||
struct S { const char *s; };
|
||||
const struct S s[] = { "s" };
|
||||
extern void foo (void (*) (void));
|
||||
static void bar (void) {}
|
||||
void baz () { foo (bar); }
|
@ -6060,7 +6060,12 @@ default_section_type_flags (tree decl, const char *name, int reloc)
|
||||
flags = SECTION_WRITE;
|
||||
}
|
||||
else
|
||||
flags = SECTION_WRITE;
|
||||
{
|
||||
flags = SECTION_WRITE;
|
||||
if (strcmp (name, ".data.rel.ro") == 0
|
||||
|| strcmp (name, ".data.rel.ro.local") == 0)
|
||||
flags |= SECTION_RELRO;
|
||||
}
|
||||
|
||||
if (decl && DECL_ONE_ONLY (decl))
|
||||
flags |= SECTION_LINKONCE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user