From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=LH9UD7oL; spf=pass (domain: linaro.org, ip: 209.85.221.68, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by groups.io with SMTP; Thu, 05 Sep 2019 09:54:07 -0700 Received: by mail-wr1-f68.google.com with SMTP id h7so3594453wrt.13 for ; Thu, 05 Sep 2019 09:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=efTMoGiiPxwv2VisQ38oygM3L8KttCR32ihNE3vL+tE=; b=LH9UD7oLc9BJsCaSHjfaiuXKGfYokxp4iSC0jEhX9ZniYwz6Dr+LAwK4lGpxbMK/p0 DQWMGXTAQnTxwtWYkL+7ZiM0s4rjeGirB4WNOWI1mB5ibYQkH/M+M72FQwyugWsMrq6b Su+7ikY4KSwpBFmBxch34MOKNRXtyWh1PKgRqyLpe5s2goyl024Cmz8/gNjDVMRpB+8e nQiiwte3bxIYTq/h3TOAsJk7xVDi4MylZt27J++aQrHyChla3alWovBQxTobmZRIfqGI JuvczH3qOV/NB5p73yXLUXLoFMK00XEy8w7fYQNBDNGoEenELIJiDc52afJ2Wym5ty8T 3ZQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=efTMoGiiPxwv2VisQ38oygM3L8KttCR32ihNE3vL+tE=; b=h+65NuCyHUqEP/VZaej1cLXJXb5As8ezL2AQqL9YQCl+oYw0fLJgpjYYg2pQPJR+fL vCTpDeH6B8iFNorg3jhG7mEg+t27elqL3vo6PMBS25RLb3EI13G2kBn6jVLMEBJq1foG LyDCWU3u3Ke5fslxsL3Eigs6OQnYmJOP34lhCajle94KEPIYIRW636cwzhKyJoZBYjgT yHRhXq82+UqDoZc2Xw0topSNF6eNto/dnJD+nTJMZL04XkBv4AJGw6hlSRYg8z9lcstH /nBmV81ZUl/Tp79dBAJc14NsHnr1V2wHlLW1CeGxBRgtahq07axizgS7PDSw929N0/GC ucRA== X-Gm-Message-State: APjAAAXxkYVqgPSX8CoRoQ1gOUrrF55u6IByc4p6gGt4ybNMghyA3lb4 PwIZ/osr3drSoJNJMP/kge+AXNToRJI= X-Google-Smtp-Source: APXvYqx0y2WYsDZTjrMniFxuHEgrLQpCjPww9qd9GpzwwzcpWoyqW+z5tagyU2HPXjcjj6fBeSFluw== X-Received: by 2002:adf:e605:: with SMTP id p5mr3448707wrm.105.1567702445763; Thu, 05 Sep 2019 09:54:05 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id e15sm2523793wru.93.2019.09.05.09.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 09:54:05 -0700 (PDT) Date: Thu, 5 Sep 2019 17:54:03 +0100 From: "Leif Lindholm" To: devel@edk2.groups.io, abner.chang@hpe.com Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 22/22]: BaseTools/Scripts Message-ID: <20190905165403.GO29255@bivouac.eciton.net> References: <1567593797-26216-1-git-send-email-abner.chang@hpe.com> <1567593797-26216-23-git-send-email-abner.chang@hpe.com> MIME-Version: 1.0 In-Reply-To: <1567593797-26216-23-git-send-email-abner.chang@hpe.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 04, 2019 at 06:43:17PM +0800, Abner Chang wrote: > Add RISC-V specific LD scripts. ."rela(INFO)" in the latest GccBase.lds causes PE32 relocation error. This is the temporaty solution untill we find the root casue. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Abner Chang I have no issue with this patch, but I can't claim to have properly reviewed it. I'll leave that for the BaseTools maintainers. / Leif > --- > BaseTools/Scripts/GccBaseRiscV.lds | 71 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 71 insertions(+) > create mode 100644 BaseTools/Scripts/GccBaseRiscV.lds > > diff --git a/BaseTools/Scripts/GccBaseRiscV.lds b/BaseTools/Scripts/GccBaseRiscV.lds > new file mode 100644 > index 0000000..b24086d > --- /dev/null > +++ b/BaseTools/Scripts/GccBaseRiscV.lds > @@ -0,0 +1,71 @@ > +/** @file > + > + Unified linker script for GCC based builds > + > + Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
> + Copyright (c) 2015, Linaro Ltd. All rights reserved.
> + > + This program and the accompanying materials are licensed and made available under > + the terms and conditions of the BSD License that accompanies this distribution. > + The full text of the license may be found at > + http://opensource.org/licenses/bsd-license.php. > + > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > + > +**/ > + > +SECTIONS { > + > + /* > + * The PE/COFF binary consists of DOS and PE/COFF headers, and a sequence of > + * section headers adding up to PECOFF_HEADER_SIZE bytes (which differs > + * between 32-bit and 64-bit builds). The actual start of the .text section > + * will be rounded up based on its actual alignment. > + */ > + . = PECOFF_HEADER_SIZE; > + > + .text : ALIGN(CONSTANT(COMMONPAGESIZE)) { > + *(.text .text.* .stub .gnu.linkonce.t.*) > + *(.rodata .rodata.* .gnu.linkonce.r.*) > + *(.got .got.*) > + > + /* > + * The contents of AutoGen.c files are constant from the POV of the program, > + * but most of its contents end up in .data or .bss by default since few of > + * the variable definitions that get emitted are declared as CONST. > + */ > + *:AutoGen.obj(.data.g*Guid) > + } > + > + /* > + * The alignment of the .data section should be less than or equal to the > + * alignment of the .text section. This ensures that the relative offset > + * between these sections is the same in the ELF and the PE/COFF versions of > + * this binary. > + */ > + .data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(COMMONPAGESIZE)) { > + *(.data .data.* .gnu.linkonce.d.*) > + *(.bss .bss.*) > + } > + > + .eh_frame ALIGN(CONSTANT(COMMONPAGESIZE)) : { > + KEEP (*(.eh_frame)) > + } > + > + .rela ALIGN(CONSTANT(COMMONPAGESIZE)) : { > + *(.rela .rela.*) > + } > + > + /DISCARD/ : { > + *(.note.GNU-stack) > + *(.gnu_debuglink) > + *(.interp) > + *(.dynsym) > + *(.dynstr) > + *(.dynamic) > + *(.hash) > + *(.comment) > + *(COMMON) > + } > +} > -- > 2.7.4 > > > >