From: Andreas Schwab <schwab@linux-m68k.org>
To: Jisheng Zhang <jszhang3@mail.ustc.edu.cn>
Cc: linux-riscv <linux-riscv@lists.infradead.org>
Subject: Re: [Request for help] issue when add relative extable support to riscv64
Date: Sun, 10 Oct 2021 18:59:14 +0200 [thread overview]
Message-ID: <87ee8sg6jh.fsf@igel.home> (raw)
In-Reply-To: <20211010235655.35c55e61@xhacker> (Jisheng Zhang's message of "Sun, 10 Oct 2021 23:56:55 +0800")
On Okt 10 2021, Jisheng Zhang wrote:
> a simple code:
>
> nop
> 1:
> .section __ex_table,"a"
> .align 3
> .long (1b - .)
>
> assemble it, then we can see that there are two entries for the above
> label substraction, R_RISCV_ADD32 and R_RISCV_SUB32
>
> Relocation section '.rela__ex_table' at offset 0x108 contains 2 entries:
> Offset Info Type Sym. Value Sym. Name + Addend
> 000000000000 000600000023 R_RISCV_ADD32 0000000000000002 .L1^B1 + 0
> 000000000000 000500000027 R_RISCV_SUB32 0000000000000000 .L0 + 0
>
> The 2nd R_RISCV_SUB32 rela entry causes the problem.
>
> Can we prevent assembler from emitting the R_RISCV_SUB32 rela entry?
There is R_RISCV_32_PCREL, but I guess it isn't used here because it was
a late addition. The assembler uses it only in a very special situation
(FDE initial location).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2021-10-10 16:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 15:57 [Request for help] issue when add relative extable support to riscv64 Jisheng Zhang
2021-09-17 16:26 ` Jisheng Zhang
2021-09-18 1:23 ` Kefeng Wang
2021-09-18 14:20 ` Jisheng Zhang
2021-10-10 15:56 ` Jisheng Zhang
2021-10-10 16:59 ` Andreas Schwab [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=87ee8sg6jh.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=jszhang3@mail.ustc.edu.cn \
--cc=linux-riscv@lists.infradead.org \
/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