Bug 84237 - [8 Regression] xen build faiulre only zero initializers are allowed in section '.bss.page_aligned.const'
Summary: [8 Regression] xen build faiulre only zero initializers are allowed in sectio...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 8.0
: P3 normal
Target Milestone: 8.0
Assignee: Jakub Jelinek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-06 14:28 UTC by Jakub Jelinek
Modified: 2018-02-09 06:46 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2018-02-06 00:00:00


Attachments
gcc8-pr84237.patch (1.11 KB, patch)
2018-02-06 15:06 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2018-02-06 14:28:43 UTC
const char __attribute__((__section__(".bss.page_aligned.const"), __aligned__(4096))) zero_page[4096];
is rejected starting with r251602.  I think if the user explicitly requests it to be put into a bss section, we should do it even when it is read-only.
Comment 1 Jakub Jelinek 2018-02-06 15:06:29 UTC
Created attachment 43348 [details]
gcc8-pr84237.patch

Untested fix.
Comment 2 Jakub Jelinek 2018-02-09 05:47:56 UTC
Author: jakub
Date: Fri Feb  9 05:47:24 2018
New Revision: 257513

URL: https://gcc.gnu.org/viewcvs?rev=257513&root=gcc&view=rev
Log:
	PR middle-end/84237
	* output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
	* varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
	TREE_READONLY bit.
	(get_variable_section): For decls in named .bss* sections pass true as
	second argument to bss_initializer_p.

	* gcc.dg/pr84237.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr84237.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/output.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/varasm.c
Comment 3 Jakub Jelinek 2018-02-09 06:46:12 UTC
Fixed.