From: Michael Matz <matz@suse.de>
To: Ulf Samuelsson <binutils@emagii.com>
Cc: binutils@sourceware.org, nickc@redhat.com
Subject: Re: [PATCH v1 0/7 SECTOR: Support aligning to flash sector boundary
Date: Mon, 13 Mar 2023 17:35:56 +0000 (UTC) [thread overview]
Message-ID: <alpine.LSU.2.20.2303131728130.16810@wotan.suse.de> (raw)
In-Reply-To: <e1e631d5-ab59-8097-786d-7ca27755a4af@emagii.com>
Hello,
On Mon, 13 Mar 2023, Ulf Samuelsson wrote:
> > That doesn't matter so much. The point is that the linker script already
> > supports an assortment of expressions, one of them 'ALIGN(EXP,ALIGN)'
> > (with EXP being optional and "dot" by default). This expression can be
> > used in arbitrary places right now. If it makes sense to use it in
> > arbitrary places? Probably not, but who knows the future? That's why
> > syntax extensions to the ldscripts should not necessarily prescribe usage,
> > and be orthogonal (that was my ultimate reason for suggesting to have
> > something returning the sector-size for a given address).
>
> SECTOR is a function which returns the size of the sector of the current
> location and can be used to align an expression to that size.
>
> You can do ALIGN(exp, SECTOR) if you want to. That will align the
> expression to the sector size of the current location. So there is no
> problem with orthogonality.
>
> You are asking for a function which does something else.
>
> You can add a function (SECTOR_SIZE '(' exp ')') if you find it useful.
SECTOR without argument is good enough for my taste. My main objection
was to the new directive ALIGN_SECTOR; I suggested SECTOR(exp) only in
response to your worry about a SECTOR expression (without argument, and
hence an implicit "dot") being used outside output section statements
without clear meaning.
So, I'm happy :) Thanks for consideration.
Ciao,
Michael.
prev parent reply other threads:[~2023-03-13 17:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 0:08 binutils
2023-03-10 0:08 ` [PATCH v1 1/7] SECTOR: NEWS binutils
2023-03-10 0:08 ` [PATCH v1 2/7] SECTOR: ld.texi binutils
2023-03-10 0:08 ` [PATCH v1 3/7] SECTOR: ldlex.l binutils
2023-03-10 0:08 ` [PATCH v1 4/7] SECTOR: ldgram.y binutils
2023-03-10 0:08 ` [PATCH v1 5/7] SECTOR: language additions binutils
2023-03-10 0:08 ` [PATCH v1 6/7] SECTOR: add testsuite binutils
2023-03-10 0:08 ` [PATCH v1 7/7] SECTOR: Makefile.* binutils
2023-03-10 3:46 ` [PATCH v1 0/7 SECTOR: Support aligning to flash sector boundary Alan Modra
2023-03-10 14:13 ` Michael Matz
2023-03-10 17:01 ` Ulf Samuelsson
2023-03-10 17:30 ` Michael Matz
2023-03-10 17:57 ` Ulf Samuelsson
2023-03-13 13:12 ` Michael Matz
2023-03-13 15:29 ` Ulf Samuelsson
2023-03-13 15:54 ` Michael Matz
2023-03-13 17:26 ` Ulf Samuelsson
2023-03-13 17:35 ` Michael Matz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LSU.2.20.2303131728130.16810@wotan.suse.de \
--to=matz@suse.de \
--cc=binutils@emagii.com \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).