aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-07-19 18:46:39 +0000
committerIan Lance Taylor <ian@airs.com>1993-07-19 18:46:39 +0000
commitffffc8fb5c4c02cc43fb2e040e5f410d470c183c (patch)
tree4170e91d5bb54f1e3b8aad434ca27bed72255260 /gas/read.c
parent28403b8ee766e730a13ad2a7f2b817d1671905fd (diff)
downloadgdb-ffffc8fb5c4c02cc43fb2e040e5f410d470c183c.zip
gdb-ffffc8fb5c4c02cc43fb2e040e5f410d470c183c.tar.gz
gdb-ffffc8fb5c4c02cc43fb2e040e5f410d470c183c.tar.bz2
* expr.c (clean_up_expression): Don't cancel the subtraction of
undefined symbols. Fixes PR 2997. * read.c (s_data), config/obj-coffbfd.c (obj_coff_data): If -R, switch to text section rather than data section. Fixes PR 2971.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gas/read.c b/gas/read.c
index be3ea77..3785a77 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -832,13 +832,22 @@ s_comm ()
void
s_data ()
{
+ segT section;
register int temp;
temp = get_absolute_expression ();
+ if (flagseen['R'])
+ {
+ section = text_section;
+ temp += 1000;
+ }
+ else
+ section = data_section;
+
#ifdef BFD_ASSEMBLER
- subseg_set (data_section, (subsegT) temp);
+ subseg_set (section, (subsegT) temp);
#else
- subseg_new (data_section, (subsegT) temp);
+ subseg_new (section, (subsegT) temp);
#endif
#ifdef OBJ_VMS