aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-06-12 21:24:56 +0000
committerIan Lance Taylor <ian@airs.com>1999-06-12 21:24:56 +0000
commitaa8804e46ee31cc1d2e00f57467c8e5a4a84a273 (patch)
tree90968c910b1a22483da719d90e576f8f9f8efcdf /ld/ldlang.c
parent57e21befb98e8ad0b2c6dda814869145a8bcd60b (diff)
downloadgdb-aa8804e46ee31cc1d2e00f57467c8e5a4a84a273.zip
gdb-aa8804e46ee31cc1d2e00f57467c8e5a4a84a273.tar.gz
gdb-aa8804e46ee31cc1d2e00f57467c8e5a4a84a273.tar.bz2
This fixes ! to work as documented in a memory region attribute list.
From Thomas Zenker <thz@lennartz-electronic.de>: * ldgram.y (attributes_opt): Use attributes_list instead of NAME. (attributes_list, attributes_string): New nonterminals. * ldlang.c (lang_set_flags): Add invert parameter. Don't handle '!'. * ldlang.c (lang_set_flags): Update declaration.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index a2c533d..862e4e2 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -3255,21 +3255,18 @@ lang_place_orphans ()
void
-lang_set_flags (ptr, flags)
+lang_set_flags (ptr, flags, invert)
lang_memory_region_type *ptr;
CONST char *flags;
+ int invert;
{
- flagword *ptr_flags = &ptr->flags;
+ flagword *ptr_flags;
- ptr->flags = ptr->not_flags = 0;
+ ptr_flags = invert ? &ptr->not_flags : &ptr->flags;
while (*flags)
{
switch (*flags)
{
- case '!':
- ptr_flags = (ptr_flags == &ptr->flags) ? &ptr->not_flags : &ptr->flags;
- break;
-
case 'A': case 'a':
*ptr_flags |= SEC_ALLOC;
break;