From 6abe7848fa4140b3cb79c6810758b21562efdc0d Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 14 Dec 2020 11:44:43 +1030 Subject: [PATCH] Solaris 11.4 ld build failure /usr/include/sys/mman.h:81:0: note: this is the location of the previous definition #define SHARED 0x10 PR 27064 * deffilep.y (SHARED_K): Rename from SHARED. Update uses. --- ld/ChangeLog | 5 +++++ ld/deffilep.y | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 9e72b31c9fa..0f5991356a9 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2020-12-14 Alan Modra + + PR 27064 + * deffilep.y (SHARED_K): Rename from SHARED. Update uses. + 2020-12-05 Maciej W. Rozycki * testsuite/ld-vax-elf/got-local-exe-off-hidden.dd: New test diff --git a/ld/deffilep.y b/ld/deffilep.y index 51cb1d7fcde..2f897453f49 100644 --- a/ld/deffilep.y +++ b/ld/deffilep.y @@ -122,7 +122,7 @@ static const char *lex_parse_string_end = 0; %token NAME LIBRARY DESCRIPTION STACKSIZE_K HEAPSIZE CODE DATAU DATAL %token SECTIONS EXPORTS IMPORTS VERSIONK BASE CONSTANTU CONSTANTL %token PRIVATEU PRIVATEL ALIGNCOMM -%token READ WRITE EXECUTE SHARED NONAMEU NONAMEL DIRECTIVE EQUAL +%token READ WRITE EXECUTE SHARED_K NONAMEU NONAMEL DIRECTIVE EQUAL %token ID %token DIGITS %type NUMBER @@ -235,7 +235,7 @@ attr: READ { $$ = 1;} | WRITE { $$ = 2;} | EXECUTE { $$=4;} - | SHARED { $$=8;} + | SHARED_K { $$=8;} ; @@ -263,7 +263,7 @@ keyword_as_name: BASE { $$ = "BASE"; } | PRIVATEU { $$ = "PRIVATE"; } | PRIVATEL { $$ = "private"; } | READ { $$ = "READ"; } - | SHARED { $$ = "SHARED"; } + | SHARED_K { $$ = "SHARED"; } | STACKSIZE_K { $$ = "STACKSIZE"; } | VERSIONK { $$ = "VERSION"; } | WRITE { $$ = "WRITE"; } @@ -1323,7 +1323,7 @@ tokens[] = { "READ", READ }, { "SECTIONS", SECTIONS }, { "SEGMENTS", SECTIONS }, - { "SHARED", SHARED }, + { "SHARED", SHARED_K }, { "STACKSIZE", STACKSIZE_K }, { "VERSION", VERSIONK }, { "WRITE", WRITE }, -- 2.30.2