This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: PATCH ld octets vs bytes support
- To: Ian Lance Taylor <ian at zembu dot com>
- Subject: Re: PATCH ld octets vs bytes support
- From: Timothy Wall <twall at domesolutions dot com>
- Date: Wed, 26 Jan 2000 13:14:25 +0000
- CC: twall at tiac dot net, binutils at sourceware dot cygnus dot com, nickc at cygnus dot com
- Organization: Dome Solutions
- References: <388EF7CC.984C4E23@tiac.net> <20000126154024.5775.qmail@daffy.airs.com>
Sticking with the LD documentation, BYTE stores exactly one octet. It'd
be up to an individual target to determine what it means to store a
number of octets that amount to less than a byte.
On the c54x (ignoring the LD docs for a moment), BYTE would be equivalent
to SHORT, using those terms (storing one byte/two octets in each case).
A reasonable thing to do here might be to set the size to be XXX_SIZE or
octets_per_byte, whichever is greater. The LD documentation would need
to be updated appropriately, but it keeps the LD tokens (BYTE, SHORT,
etc) consistent with target usage.
T.
Ian Lance Taylor wrote:
> Date: Wed, 26 Jan 2000 08:34:04 -0500
> From: Timothy Wall <twall@tiac.net>
>
> *************** lang_do_assignments (s, output_section_s
> *** 3118,3139 ****
> if (value.valid_p == false)
> einfo (_("%F%P: invalid data statement\n"));
> }
> ! switch (s->data_statement.type)
> ! {
> ! case QUAD:
> ! case SQUAD:
> ! dot += QUAD_SIZE;
> ! break;
> ! case LONG:
> ! dot += LONG_SIZE;
> ! break;
> ! case SHORT:
> ! dot += SHORT_SIZE;
> ! break;
> ! case BYTE:
> ! dot += BYTE_SIZE;
> ! break;
> ! }
> break;
>
> case lang_reloc_statement_enum:
> --- 3139,3164 ----
> if (value.valid_p == false)
> einfo (_("%F%P: invalid data statement\n"));
> }
> ! {
> ! int size;
> ! switch (s->data_statement.type)
> ! {
> ! case QUAD:
> ! case SQUAD:
> ! size = QUAD_SIZE;
> ! break;
> ! case LONG:
> ! size = LONG_SIZE;
> ! break;
> ! case SHORT:
> ! size = SHORT_SIZE;
> ! break;
> ! case BYTE:
> ! size = BYTE_SIZE;
> ! break;
> ! }
> ! dot += size / opb;
> ! }
> break;
>
> case lang_reloc_statement_enum:
>
> I'm a little concerned about this. It seems that BYTE isn't going to
> work if opb > 1. I think we should at least give a warning in the
> case where an unsupported data generation operator is used.
>
> Ian