public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: mengqinggang <mengqinggang@loongson.cn>
Cc: binutils@sourceware.org,  xuchenghua@loongson.cn,
	liuzhensong@loongson.cn,  chenglulu@loongson.cn,
	 xry111@xry111.site, i.swmail@xen0n.name,  maskray@google.com
Subject: Re: [PATCH v1 5/6] LoongArch: gas: Add support for linker relaxation.
Date: Mon, 05 Dec 2022 10:47:30 +0100	[thread overview]
Message-ID: <mvmzgc25gi5.fsf@suse.de> (raw)
In-Reply-To: <20221205080453.1352069-6-mengqinggang@loongson.cn> (mengqinggang@loongson.cn's message of "Mon, 5 Dec 2022 16:04:52 +0800")

On Dez 05 2022, mengqinggang wrote:

> @@ -1258,19 +1406,7 @@ int
>  md_estimate_size_before_relax (fragS *fragp ATTRIBUTE_UNUSED,
>  			       asection *segtype ATTRIBUTE_UNUSED)
>  {
> -  return 0;
> -}
> -
> -int
> -loongarch_fix_adjustable (fixS *fix)
> -{
> -  /* Prevent all adjustments to global symbols.  */
> -  if (S_IS_EXTERNAL (fix->fx_addsy)
> -      || S_IS_WEAK (fix->fx_addsy)
> -      || S_FORCE_RELOC (fix->fx_addsy, true))
> -    return 0;
> -
> -  return 1;
> +  return (fragp->fr_var = 4);

Please don't use an assignment inside an expression.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

  reply	other threads:[~2022-12-05  9:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05  8:04 [PATCH v1 0/6] LoongArch linker relaxation support mengqinggang
2022-12-05  8:04 ` [PATCH v1 1/6] LoongArch: include: Add support for linker relaxation mengqinggang
2022-12-05  8:24   ` Xi Ruoyao
2022-12-06  2:59     ` mengqinggang
2022-12-05  8:04 ` [PATCH v1 2/6] LoongArch: bfd: " mengqinggang
2022-12-05  8:04 ` [PATCH v1 3/6] LoongArch: opcodes: " mengqinggang
2022-12-05  9:43   ` Andreas Schwab
2022-12-05  8:04 ` [PATCH v1 4/6] LoongArch: binutils: " mengqinggang
2022-12-05  8:04 ` [PATCH v1 5/6] LoongArch: gas: " mengqinggang
2022-12-05  9:47   ` Andreas Schwab [this message]
2022-12-05  8:04 ` [PATCH v1 6/6] LoongArch: ld: " mengqinggang
2022-12-05  8:31   ` Xi Ruoyao
2022-12-05  8:43 ` [PATCH v1 0/6] LoongArch linker relaxation support Xi Ruoyao
2022-12-06  1:58   ` mengqinggang

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=mvmzgc25gi5.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=binutils@sourceware.org \
    --cc=chenglulu@loongson.cn \
    --cc=i.swmail@xen0n.name \
    --cc=liuzhensong@loongson.cn \
    --cc=maskray@google.com \
    --cc=mengqinggang@loongson.cn \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /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).