From: Ulf Samuelsson <binutils@emagii.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Nick Clifton <nickc@redhat.com>, binutils@sourceware.org
Subject: Re: RFC: generating a header using the linker (ASCII, ASCIZ commands)
Date: Mon, 13 Feb 2023 16:54:58 +0100 [thread overview]
Message-ID: <f2081d90-2fde-bf3a-9ffc-b9736fc4ed7e@emagii.com> (raw)
In-Reply-To: <ece91124-a230-dda6-b911-2656440d7898@suse.com>
Den 2023-02-13 kl. 13:33, skrev Jan Beulich:
> On 13.02.2023 12:12, Ulf Samuelsson via Binutils wrote:
>> Den 2023-02-13 kl. 11:09, skrev Nick Clifton:
>>>> One of the problems was that we wanted to generate a header,
>>>> and for various reasons, it was desirable to have the linker generate
>>>> the header
>>> From the sound of what you have written below it would be
>>> easier to use the assembler to create the header and then just
>>> include it as another object file when you perform your link.
>>> That together with a customised linker script should allow you
>>> to achieve what you want without having to add new code to the
>>> linker.
>> One of the problems is time of build.
>> The header should contain the time when things are linked together, not
>> when things are compiled.
>>
>> Another is that one of the fields is the size of the application which
>> is only known at link time.
>>
>> Doing things in the linker seems to be the cleanest way.
>>
>> We would probably have the header is in a separate file which is
>> included in the linker script.
> Otherwise I would be wondering if you're not really defining a new binary
> format (potentially an extension of an existing one), at which point it
> might be best to also treat it as such in binutils / ld.
Yes, but each customer has their own header format and they
do not want to make changes to binutils.
Typically, the image is downloaded and checked by a bootloader
which will receive a binary.
You also want to be able to download it with a debugger during development.
I do not think you need a new binary format for this.
Simplifying the creation of the header file is good enough for me.
/Ulf
> Jan
next prev parent reply other threads:[~2023-02-13 15:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 17:36 Ulf Samuelsson
2023-02-13 10:09 ` Nick Clifton
2023-02-13 11:12 ` Ulf Samuelsson
2023-02-13 12:33 ` Jan Beulich
2023-02-13 15:54 ` Ulf Samuelsson [this message]
2023-02-13 14:11 ` Nick Clifton
2023-02-13 16:04 ` Ulf Samuelsson
2023-02-14 16:06 ` Nick Clifton
2023-02-14 18:12 ` Ulf Samuelsson
2023-02-15 20:07 ` RFC: generating a header using the linker (CRC calculation) Ulf Samuelsson
2023-02-15 21:01 ` Ulf Samuelsson
2023-02-15 21:29 ` Paul Koning
2023-02-15 22:08 ` Ulf Samuelsson
2023-02-15 22:11 ` Paul Koning
2023-02-16 6:45 ` Ulf Samuelsson
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=f2081d90-2fde-bf3a-9ffc-b9736fc4ed7e@emagii.com \
--to=binutils@emagii.com \
--cc=binutils@sourceware.org \
--cc=jbeulich@suse.com \
--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).