All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/8] riscv: Enable function sections
Date: Mon, 23 Apr 2018 19:21:03 +0200	[thread overview]
Message-ID: <d3621dc8-64d3-57c4-4781-b3d92df34d07@suse.de> (raw)
In-Reply-To: <ce7afb6e-605e-1048-837d-e7573e98fe19@gmx.de>



On 23.04.18 09:35, Heinrich Schuchardt wrote:
> 
> 
> On 04/23/2018 07:59 AM, Alexander Graf wrote:
>> The linker can remove sections that are never addressed, so it makes a
>> lot
>> of sense to declare every function as an individual section.
>>
>> This reduces the output U-Boot code size by ~30kb for me.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> ---
>>   arch/riscv/config.mk | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/riscv/config.mk b/arch/riscv/config.mk
>> index 6b681c4286..69f4cf6ce8 100644
>> --- a/arch/riscv/config.mk
>> +++ b/arch/riscv/config.mk
>> @@ -29,5 +29,5 @@ CONFIG_STANDALONE_LOAD_ADDR = 0x00000000 \
>>                     -T $(srctree)/examples/standalone/riscv.lds
>>     PLATFORM_CPPFLAGS    += -ffixed-gp -fpic
>> -PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -gdwarf-2
>> +PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -gdwarf-2
>> -ffunction-sections
> 
> Other architectures also use -fdata-sections.
> Why wouldn't we set it for RISC-V?

I think we could. That definitely makes sense as a follow-up patch -
ideally slightly more cross-architecture :).


Alex

  reply	other threads:[~2018-04-23 17:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23  5:59 [U-Boot] [PATCH v3 0/8] riscv: Enable efi_loader support Alexander Graf
2018-04-23  5:59 ` [U-Boot] [PATCH v3 1/8] riscv: Add setjmp/longjmp code Alexander Graf
2018-05-07  2:25   ` rick at andestech.com
2018-04-23  5:59 ` [U-Boot] [PATCH v3 2/8] riscv: Enable function sections Alexander Graf
2018-04-23  7:35   ` Heinrich Schuchardt
2018-04-23 17:21     ` Alexander Graf [this message]
2018-05-07  2:24   ` rick at andestech.com
2018-04-23  5:59 ` [U-Boot] [PATCH v3 3/8] riscv: Add EFI application infrastructure Alexander Graf
2018-04-23  5:59 ` [U-Boot] [PATCH v3 4/8] riscv: Add board_quiesce_devices stub Alexander Graf
2018-05-07  2:25   ` rick at andestech.com
2018-04-23  5:59 ` [U-Boot] [PATCH v3 5/8] efi_loader: Use EFI_CACHELINE_SIZE in the image loader too Alexander Graf
2018-04-23  7:19   ` Heinrich Schuchardt
2018-04-23  5:59 ` [U-Boot] [PATCH v3 6/8] distro: Extend with RISC-V defines Alexander Graf
2018-04-23  6:56   ` Heinrich Schuchardt
2018-04-23  5:59 ` [U-Boot] [PATCH v3 7/8] riscv: nx25: Enable distro boot Alexander Graf
2018-04-24  6:28   ` rick at andestech.com
2018-04-24  7:53     ` Alexander Graf
2018-05-07  2:33   ` rick at andestech.com
2018-04-23  5:59 ` [U-Boot] [PATCH v3 8/8] efi_loader: Enable RISC-V support Alexander Graf
2018-05-06 20:59 ` [U-Boot] [PATCH v3 0/8] riscv: Enable efi_loader support Alexander Graf
2018-05-07  2:13   ` rick at andestech.com
2018-05-09  7:30     ` Alexander Graf
2018-05-06 21:11 ` Tom Rini
2018-05-07  2:18   ` rick at andestech.com

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=d3621dc8-64d3-57c4-4781-b3d92df34d07@suse.de \
    --to=agraf@suse.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.