* [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type
@ 2023-10-17 8:40 Neal Frager
2023-10-17 8:40 ` [PATCH v2 2/2] gas: testsuite: Add microblaze reloc test Neal Frager
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Neal Frager @ 2023-10-17 8:40 UTC (permalink / raw)
To: binutils, eager, eager
Cc: ibai.erkiaga-elorza, nagaraju.mekala, mark.hatle,
sadanand.mutyala, appa.rao.nali, vidhumouli.hunsigida,
luca.ceresoli, nickc, Neal Frager
This patch adds the R_MICROBLAZE_32_NONE relocation type.
This is a 32-bit reloc that stores the 32-bit pc relative
value in two words (with an imm instruction).
This patch does not cause any regressions. Below are the
testsuite results before and after application of this patch:
./configure --disable-nls --disable-gdb --disable-gdbserver \
--disable-gprofng --disable-libbacktrace \
--disable-libdecnumber --disable-readline \
--disable-sim --enable-obsolete --enable-plugins \
--build=powerpc64le-linux --target=microblaze-xilinx-elf
=== binutils Summary ===
# of expected passes 220
# of expected failures 2
# of untested testcases 17
# of unsupported tests 14
=== gas Summary ===
# of expected passes 272
# of unexpected failures 1
# of expected failures 1
# of unsupported tests 8
=== ld Summary ===
# of expected passes 379
# of unexpected failures 4
# of expected failures 13
# of untested testcases 26
# of unsupported tests 217
=== libctf Summary ===
# of expected passes 5
# of unsupported tests 3
=== libsframe Summary ===
# of expected passes 57
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
bfd/bfd-in2.h | 5 +++++
bfd/elf32-microblaze.c | 25 +++++++++++++++++++++++--
bfd/libbfd.h | 1 +
bfd/reloc.c | 6 ++++++
binutils/readelf.c | 4 ++++
gas/config/tc-microblaze.c | 3 +++
include/elf/microblaze.h | 1 +
7 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index c1fe48bb2f1..fb0ead46aba 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -6463,6 +6463,11 @@ value relative to the read-write small data area anchor */
expressions of the form "Symbol Op Symbol" */
BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
+/* This is a 32 bit reloc that stores the 32 bit pc relative
+value in two words (with an imm instruction).No relocation is
+done here - only used for relaxing */
+ BFD_RELOC_MICROBLAZE_32_NONE,
+
/* This is a 64 bit reloc that stores the 32 bit pc relative
value in two words (with an imm instruction). No relocation is
done here - only used for relaxing */
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index a7e81c70fc8..c10278cde31 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -174,6 +174,21 @@ static reloc_howto_type microblaze_elf_howto_raw[] =
0x0000ffff, /* Dest Mask. */
false), /* PC relative offset? */
+ /* This reloc does nothing. Used for relaxation. */
+ HOWTO (R_MICROBLAZE_32_NONE, /* Type. */
+ 0, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 32, /* Bitsize. */
+ true, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_bitfield, /* Complain on overflow. */
+ NULL, /* Special Function. */
+ "R_MICROBLAZE_32_NONE", /* Name. */
+ false, /* Partial Inplace. */
+ 0, /* Source Mask. */
+ 0, /* Dest Mask. */
+ false), /* PC relative offset? */
+
/* This reloc does nothing. Used for relaxation. */
HOWTO (R_MICROBLAZE_64_NONE, /* Type. */
0, /* Rightshift. */
@@ -560,6 +575,9 @@ microblaze_elf_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
case BFD_RELOC_NONE:
microblaze_reloc = R_MICROBLAZE_NONE;
break;
+ case BFD_RELOC_MICROBLAZE_32_NONE:
+ microblaze_reloc = R_MICROBLAZE_32_NONE;
+ break;
case BFD_RELOC_MICROBLAZE_64_NONE:
microblaze_reloc = R_MICROBLAZE_64_NONE;
break;
@@ -1954,6 +1972,7 @@ microblaze_elf_relax_section (bfd *abfd,
}
break;
case R_MICROBLAZE_NONE:
+ case R_MICROBLAZE_32_NONE:
{
/* This was a PC-relative instruction that was
completely resolved. */
@@ -2009,7 +2028,9 @@ microblaze_elf_relax_section (bfd *abfd,
irelscanend = irelocs + o->reloc_count;
for (irelscan = irelocs; irelscan < irelscanend; irelscan++)
{
- if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)
+ if ((ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32) ||
+ (ELF32_R_TYPE (irelscan->r_info) ==
+ (int) R_MICROBLAZE_32_NONE))
{
isym = isymbuf + ELF32_R_SYM (irelscan->r_info);
@@ -2068,7 +2089,7 @@ microblaze_elf_relax_section (bfd *abfd,
elf_section_data (o)->this_hdr.contents = ocontents;
}
}
- irelscan->r_addend -= calc_fixup (irel->r_addend
+ irelscan->r_addend -= calc_fixup (irelscan->r_addend
+ isym->st_value,
0,
sec);
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index d5f42f22c08..d729dc48e7c 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -3010,6 +3010,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MICROBLAZE_32_ROSDA",
"BFD_RELOC_MICROBLAZE_32_RWSDA",
"BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM",
+ "BFD_RELOC_MICROBLAZE_32_NONE",
"BFD_RELOC_MICROBLAZE_64_NONE",
"BFD_RELOC_MICROBLAZE_64_GOTPC",
"BFD_RELOC_MICROBLAZE_64_GOT",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 2ac883d0eac..3ea2afc0d4e 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -6694,6 +6694,12 @@ ENUM
ENUMDOC
This is a 32 bit reloc for the microblaze to handle
expressions of the form "Symbol Op Symbol"
+ENUM
+ BFD_RELOC_MICROBLAZE_32_NONE
+ENUMDOC
+ This is a 32 bit reloc that stores the 32 bit pc relative
+ value in two words (with an imm instruction). No relocation is
+ done here - only used for relaxing
ENUM
BFD_RELOC_MICROBLAZE_64_NONE
ENUMDOC
diff --git a/binutils/readelf.c b/binutils/readelf.c
index c9b6210e229..17fd7066b83 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -15279,6 +15279,10 @@ is_8bit_abs_reloc (Filedata * filedata, unsigned int reloc_type)
return reloc_type == 54; /* R_RISCV_SET8. */
case EM_Z80:
return reloc_type == 1; /* R_Z80_8. */
+ case EM_MICROBLAZE:
+ return reloc_type == 33 /* R_MICROBLAZE_32_NONE. */
+ || reloc_type == 0 /* R_MICROBLAZE_NONE. */
+ || reloc_type == 9; /* R_MICROBLAZE_64_NONE. */
default:
return false;
}
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index b510da95024..604cc935da9 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -2290,6 +2290,8 @@ md_apply_fix (fixS * fixP,
moves code around due to relaxing. */
if (fixP->fx_r_type == BFD_RELOC_64_PCREL)
fixP->fx_r_type = BFD_RELOC_MICROBLAZE_64_NONE;
+ else if (fixP->fx_r_type == BFD_RELOC_32)
+ fixP->fx_r_type = BFD_RELOC_MICROBLAZE_32_NONE;
else
fixP->fx_r_type = BFD_RELOC_NONE;
fixP->fx_addsy = section_symbol (absolute_section);
@@ -2513,6 +2515,7 @@ tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp)
switch (fixp->fx_r_type)
{
case BFD_RELOC_NONE:
+ case BFD_RELOC_MICROBLAZE_32_NONE:
case BFD_RELOC_MICROBLAZE_64_NONE:
case BFD_RELOC_32:
case BFD_RELOC_MICROBLAZE_32_LO:
diff --git a/include/elf/microblaze.h b/include/elf/microblaze.h
index fecdd7e4831..164b36d0978 100644
--- a/include/elf/microblaze.h
+++ b/include/elf/microblaze.h
@@ -61,6 +61,7 @@ START_RELOC_NUMBERS (elf_microblaze_reloc_type)
RELOC_NUMBER (R_MICROBLAZE_TEXTPCREL_64, 30) /* PC-relative TEXT offset. */
RELOC_NUMBER (R_MICROBLAZE_TEXTREL_64, 31) /* TEXT Entry offset 64-bit. */
RELOC_NUMBER (R_MICROBLAZE_TEXTREL_32_LO, 32) /* TEXT Entry offset 32-bit. */
+ RELOC_NUMBER (R_MICROBLAZE_32_NONE, 33)
END_RELOC_NUMBERS (R_MICROBLAZE_max)
/* Global base address names. */
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 2/2] gas: testsuite: Add microblaze reloc test
2023-10-17 8:40 [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type Neal Frager
@ 2023-10-17 8:40 ` Neal Frager
2023-11-10 14:28 ` Nick Clifton
2023-10-20 13:18 ` [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type Frager, Neal
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Neal Frager @ 2023-10-17 8:40 UTC (permalink / raw)
To: binutils, eager, eager
Cc: ibai.erkiaga-elorza, nagaraju.mekala, mark.hatle,
sadanand.mutyala, appa.rao.nali, vidhumouli.hunsigida,
luca.ceresoli, nickc, Neal Frager
This patch adds code to the gas/microblaze/reloc_sym.exp
test to verify R_MICROBLAZE_32_NONE relocation type.
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
gas/testsuite/gas/microblaze/reloc_sym.d | 5 +++++
gas/testsuite/gas/microblaze/reloc_weaksym.s | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/gas/testsuite/gas/microblaze/reloc_sym.d b/gas/testsuite/gas/microblaze/reloc_sym.d
index 571ffe1bba8..cbc55633a2f 100644
--- a/gas/testsuite/gas/microblaze/reloc_sym.d
+++ b/gas/testsuite/gas/microblaze/reloc_sym.d
@@ -30,6 +30,11 @@ Disassembly of section .text:
100000a8: 30210020 addik r1, r1, 32
100000ac: b60f0008 rtsd r15, 8
100000b0: 80000000 or r0, r0, r0
+100000b4: 14422003 cmpu r2, r2, r4
+100000b8: be220004 bneid r2, 4 // 100000bc <reloc_none_test>
+
+100000bc <reloc_none_test>:
+100000bc: a0630001 ori r3, r3, 1
Disassembly of section .testsection:
diff --git a/gas/testsuite/gas/microblaze/reloc_weaksym.s b/gas/testsuite/gas/microblaze/reloc_weaksym.s
index 7dd9b981462..44258093376 100644
--- a/gas/testsuite/gas/microblaze/reloc_weaksym.s
+++ b/gas/testsuite/gas/microblaze/reloc_weaksym.s
@@ -42,7 +42,8 @@ main:
addik r1,r1,32
rtsd r15,8
nop # Unfilled delay slot
-
+ cmpu r2,r2,r4
+ BNEID r2,reloc_none_test
.end main
$Lfe2:
.size main,$Lfe2-main
@@ -50,3 +51,5 @@ $Lfe2:
test_start = __def_start
.globl test_start_strong
test_start_strong = __def_start
+reloc_none_test:
+ ori r3,r3,1
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type
2023-10-17 8:40 [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type Neal Frager
2023-10-17 8:40 ` [PATCH v2 2/2] gas: testsuite: Add microblaze reloc test Neal Frager
@ 2023-10-20 13:18 ` Frager, Neal
2023-10-20 14:14 ` Michael Eager
2023-11-10 14:27 ` Nick Clifton
3 siblings, 0 replies; 8+ messages in thread
From: Frager, Neal @ 2023-10-20 13:18 UTC (permalink / raw)
To: binutils, eager, eager
Cc: Erkiaga Elorza, Ibai, Mekala, Nagaraju, Hatle, Mark, Mutyala,
Sadanand, Nali, Appa Rao, Hunsigida, Vidhumouli, luca.ceresoli,
nickc
Hi Michael,
Any feedback on this patch?
> This patch adds the R_MICROBLAZE_32_NONE relocation type.
> This is a 32-bit reloc that stores the 32-bit pc relative value in two words (with an imm instruction).
> This patch does not cause any regressions. Below are the testsuite results before and after application of this patch:
> ---
> bfd/bfd-in2.h | 5 +++++
> bfd/elf32-microblaze.c | 25 +++++++++++++++++++++++--
> bfd/libbfd.h | 1 +
> bfd/reloc.c | 6 ++++++
> binutils/readelf.c | 4 ++++
> gas/config/tc-microblaze.c | 3 +++
> include/elf/microblaze.h | 1 +
> 7 files changed, 43 insertions(+), 2 deletions(-)
Thank you for your support!
Best regards,
Neal Frager
AMD
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type
2023-10-17 8:40 [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type Neal Frager
2023-10-17 8:40 ` [PATCH v2 2/2] gas: testsuite: Add microblaze reloc test Neal Frager
2023-10-20 13:18 ` [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type Frager, Neal
@ 2023-10-20 14:14 ` Michael Eager
2023-11-10 14:27 ` Nick Clifton
3 siblings, 0 replies; 8+ messages in thread
From: Michael Eager @ 2023-10-20 14:14 UTC (permalink / raw)
To: Neal Frager, binutils, eager
Cc: ibai.erkiaga-elorza, nagaraju.mekala, mark.hatle,
sadanand.mutyala, appa.rao.nali, vidhumouli.hunsigida,
luca.ceresoli, nickc
See notes inline.
On 10/17/23 01:40, Neal Frager wrote:
> This patch adds the R_MICROBLAZE_32_NONE relocation type.
> This is a 32-bit reloc that stores the 32-bit pc relative
> value in two words (with an imm instruction).
>
> This patch does not cause any regressions. Below are the
> testsuite results before and after application of this patch:
>
> ./configure --disable-nls --disable-gdb --disable-gdbserver \
> --disable-gprofng --disable-libbacktrace \
> --disable-libdecnumber --disable-readline \
> --disable-sim --enable-obsolete --enable-plugins \
> --build=powerpc64le-linux --target=microblaze-xilinx-elf
>
> === binutils Summary ===
>
> # of expected passes 220
> # of expected failures 2
> # of untested testcases 17
> # of unsupported tests 14
>
> === gas Summary ===
>
> # of expected passes 272
> # of unexpected failures 1
> # of expected failures 1
> # of unsupported tests 8
>
> === ld Summary ===
>
> # of expected passes 379
> # of unexpected failures 4
> # of expected failures 13
> # of untested testcases 26
> # of unsupported tests 217
>
> === libctf Summary ===
>
> # of expected passes 5
> # of unsupported tests 3
>
> === libsframe Summary ===
>
> # of expected passes 57
Removed regression test commentary from commit message.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
> bfd/bfd-in2.h | 5 +++++
> bfd/elf32-microblaze.c | 25 +++++++++++++++++++++++--
> bfd/libbfd.h | 1 +
> bfd/reloc.c | 6 ++++++
> binutils/readelf.c | 4 ++++
> gas/config/tc-microblaze.c | 3 +++
> include/elf/microblaze.h | 1 +
> 7 files changed, 43 insertions(+), 2 deletions(-)
>
> diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
> index c1fe48bb2f1..fb0ead46aba 100644
> --- a/bfd/bfd-in2.h
> +++ b/bfd/bfd-in2.h
> @@ -6463,6 +6463,11 @@ value relative to the read-write small data area anchor */
> expressions of the form "Symbol Op Symbol" */
> BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
>
> +/* This is a 32 bit reloc that stores the 32 bit pc relative
> +value in two words (with an imm instruction).No relocation is
> +done here - only used for relaxing */
> + BFD_RELOC_MICROBLAZE_32_NONE,
> +
> /* This is a 64 bit reloc that stores the 32 bit pc relative
> value in two words (with an imm instruction). No relocation is
> done here - only used for relaxing */
> diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
> index a7e81c70fc8..c10278cde31 100644
> --- a/bfd/elf32-microblaze.c
> +++ b/bfd/elf32-microblaze.c
> @@ -174,6 +174,21 @@ static reloc_howto_type microblaze_elf_howto_raw[] =
> 0x0000ffff, /* Dest Mask. */
> false), /* PC relative offset? */
>
> + /* This reloc does nothing. Used for relaxation. */
> + HOWTO (R_MICROBLAZE_32_NONE, /* Type. */
> + 0, /* Rightshift. */
> + 2, /* Size (0 = byte, 1 = short, 2 = long). */
> + 32, /* Bitsize. */
> + true, /* PC_relative. */
> + 0, /* Bitpos. */
> + complain_overflow_bitfield, /* Complain on overflow. */
> + NULL, /* Special Function. */
> + "R_MICROBLAZE_32_NONE", /* Name. */
> + false, /* Partial Inplace. */
> + 0, /* Source Mask. */
> + 0, /* Dest Mask. */
> + false), /* PC relative offset? */
> +
> /* This reloc does nothing. Used for relaxation. */
> HOWTO (R_MICROBLAZE_64_NONE, /* Type. */
> 0, /* Rightshift. */
> @@ -560,6 +575,9 @@ microblaze_elf_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
> case BFD_RELOC_NONE:
> microblaze_reloc = R_MICROBLAZE_NONE;
> break;
> + case BFD_RELOC_MICROBLAZE_32_NONE:
> + microblaze_reloc = R_MICROBLAZE_32_NONE;
> + break;
> case BFD_RELOC_MICROBLAZE_64_NONE:
> microblaze_reloc = R_MICROBLAZE_64_NONE;
> break;
> @@ -1954,6 +1972,7 @@ microblaze_elf_relax_section (bfd *abfd,
> }
> break;
> case R_MICROBLAZE_NONE:
> + case R_MICROBLAZE_32_NONE:
> {
> /* This was a PC-relative instruction that was
> completely resolved. */
> @@ -2009,7 +2028,9 @@ microblaze_elf_relax_section (bfd *abfd,
> irelscanend = irelocs + o->reloc_count;
> for (irelscan = irelocs; irelscan < irelscanend; irelscan++)
> {
> - if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)
> + if ((ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32) ||
> + (ELF32_R_TYPE (irelscan->r_info) ==
> + (int) R_MICROBLAZE_32_NONE))
> {
> isym = isymbuf + ELF32_R_SYM (irelscan->r_info);
>
> @@ -2068,7 +2089,7 @@ microblaze_elf_relax_section (bfd *abfd,
> elf_section_data (o)->this_hdr.contents = ocontents;
> }
> }
> - irelscan->r_addend -= calc_fixup (irel->r_addend
> + irelscan->r_addend -= calc_fixup (irelscan->r_addend
> + isym->st_value,
> 0,
> sec);
> diff --git a/bfd/libbfd.h b/bfd/libbfd.h
> index d5f42f22c08..d729dc48e7c 100644
> --- a/bfd/libbfd.h
> +++ b/bfd/libbfd.h
> @@ -3010,6 +3010,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
> "BFD_RELOC_MICROBLAZE_32_ROSDA",
> "BFD_RELOC_MICROBLAZE_32_RWSDA",
> "BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM",
> + "BFD_RELOC_MICROBLAZE_32_NONE",
> "BFD_RELOC_MICROBLAZE_64_NONE",
> "BFD_RELOC_MICROBLAZE_64_GOTPC",
> "BFD_RELOC_MICROBLAZE_64_GOT",
> diff --git a/bfd/reloc.c b/bfd/reloc.c
> index 2ac883d0eac..3ea2afc0d4e 100644
> --- a/bfd/reloc.c
> +++ b/bfd/reloc.c
> @@ -6694,6 +6694,12 @@ ENUM
> ENUMDOC
> This is a 32 bit reloc for the microblaze to handle
> expressions of the form "Symbol Op Symbol"
> +ENUM
> + BFD_RELOC_MICROBLAZE_32_NONE
> +ENUMDOC
> + This is a 32 bit reloc that stores the 32 bit pc relative
> + value in two words (with an imm instruction). No relocation is
> + done here - only used for relaxing
> ENUM
> BFD_RELOC_MICROBLAZE_64_NONE
> ENUMDOC
> diff --git a/binutils/readelf.c b/binutils/readelf.c
> index c9b6210e229..17fd7066b83 100644
> --- a/binutils/readelf.c
> +++ b/binutils/readelf.c
> @@ -15279,6 +15279,10 @@ is_8bit_abs_reloc (Filedata * filedata, unsigned int reloc_type)
> return reloc_type == 54; /* R_RISCV_SET8. */
> case EM_Z80:
> return reloc_type == 1; /* R_Z80_8. */
> + case EM_MICROBLAZE:
> + return reloc_type == 33 /* R_MICROBLAZE_32_NONE. */
> + || reloc_type == 0 /* R_MICROBLAZE_NONE. */
> + || reloc_type == 9; /* R_MICROBLAZE_64_NONE. */
Fixed: Parens and indent.
> default:
> return false;
> }
> diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
> index b510da95024..604cc935da9 100644
> --- a/gas/config/tc-microblaze.c
> +++ b/gas/config/tc-microblaze.c
> @@ -2290,6 +2290,8 @@ md_apply_fix (fixS * fixP,
> moves code around due to relaxing. */
> if (fixP->fx_r_type == BFD_RELOC_64_PCREL)
> fixP->fx_r_type = BFD_RELOC_MICROBLAZE_64_NONE;
> + else if (fixP->fx_r_type == BFD_RELOC_32)
> + fixP->fx_r_type = BFD_RELOC_MICROBLAZE_32_NONE;
> else
> fixP->fx_r_type = BFD_RELOC_NONE;
> fixP->fx_addsy = section_symbol (absolute_section);
> @@ -2513,6 +2515,7 @@ tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp)
> switch (fixp->fx_r_type)
> {
> case BFD_RELOC_NONE:
> + case BFD_RELOC_MICROBLAZE_32_NONE:
> case BFD_RELOC_MICROBLAZE_64_NONE:
> case BFD_RELOC_32:
> case BFD_RELOC_MICROBLAZE_32_LO:
> diff --git a/include/elf/microblaze.h b/include/elf/microblaze.h
> index fecdd7e4831..164b36d0978 100644
> --- a/include/elf/microblaze.h
> +++ b/include/elf/microblaze.h
> @@ -61,6 +61,7 @@ START_RELOC_NUMBERS (elf_microblaze_reloc_type)
> RELOC_NUMBER (R_MICROBLAZE_TEXTPCREL_64, 30) /* PC-relative TEXT offset. */
> RELOC_NUMBER (R_MICROBLAZE_TEXTREL_64, 31) /* TEXT Entry offset 64-bit. */
> RELOC_NUMBER (R_MICROBLAZE_TEXTREL_32_LO, 32) /* TEXT Entry offset 32-bit. */
> + RELOC_NUMBER (R_MICROBLAZE_32_NONE, 33)
> END_RELOC_NUMBERS (R_MICROBLAZE_max)
>
> /* Global base address names. */
Combined with gas test case.
Committed.
--
Michael Eager
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type
2023-10-17 8:40 [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type Neal Frager
` (2 preceding siblings ...)
2023-10-20 14:14 ` Michael Eager
@ 2023-11-10 14:27 ` Nick Clifton
2023-11-10 16:31 ` Michael Eager
3 siblings, 1 reply; 8+ messages in thread
From: Nick Clifton @ 2023-11-10 14:27 UTC (permalink / raw)
To: Neal Frager, binutils, eager, eager
Cc: ibai.erkiaga-elorza, nagaraju.mekala, mark.hatle,
sadanand.mutyala, appa.rao.nali, vidhumouli.hunsigida,
luca.ceresoli
Hi Neal,
> This patch adds the R_MICROBLAZE_32_NONE relocation type.
> This is a 32-bit reloc that stores the 32-bit pc relative
> value in two words (with an imm instruction).
Patch approved - please apply, but with one small change:
> for (irelscan = irelocs; irelscan < irelscanend; irelscan++)
> {
> - if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)
> + if ((ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32) ||
> + (ELF32_R_TYPE (irelscan->r_info) ==
> + (int) R_MICROBLAZE_32_NONE))
> {
Formatting: please do not end a line with a logical operator, in this case: ||
Instead please move the operator to the start of the next line.
Cheers
Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] gas: testsuite: Add microblaze reloc test
2023-10-17 8:40 ` [PATCH v2 2/2] gas: testsuite: Add microblaze reloc test Neal Frager
@ 2023-11-10 14:28 ` Nick Clifton
2023-11-10 16:14 ` Michael Eager
0 siblings, 1 reply; 8+ messages in thread
From: Nick Clifton @ 2023-11-10 14:28 UTC (permalink / raw)
To: Neal Frager, binutils, eager, eager
Cc: ibai.erkiaga-elorza, nagaraju.mekala, mark.hatle,
sadanand.mutyala, appa.rao.nali, vidhumouli.hunsigida,
luca.ceresoli
Hi Neal,
> This patch adds code to the gas/microblaze/reloc_sym.exp
> test to verify R_MICROBLAZE_32_NONE relocation type.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] gas: testsuite: Add microblaze reloc test
2023-11-10 14:28 ` Nick Clifton
@ 2023-11-10 16:14 ` Michael Eager
0 siblings, 0 replies; 8+ messages in thread
From: Michael Eager @ 2023-11-10 16:14 UTC (permalink / raw)
To: Nick Clifton, Neal Frager, binutils, eager
Cc: ibai.erkiaga-elorza, nagaraju.mekala, mark.hatle,
sadanand.mutyala, appa.rao.nali, vidhumouli.hunsigida,
luca.ceresoli
On 11/10/23 06:28, Nick Clifton wrote:
> Hi Neal,
>
>> This patch adds code to the gas/microblaze/reloc_sym.exp
>> test to verify R_MICROBLAZE_32_NONE relocation type.
>
> Approved - please apply.
>
This patch was applied 10/20/23.
--
Michael Eager
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type
2023-11-10 14:27 ` Nick Clifton
@ 2023-11-10 16:31 ` Michael Eager
0 siblings, 0 replies; 8+ messages in thread
From: Michael Eager @ 2023-11-10 16:31 UTC (permalink / raw)
To: Nick Clifton, Neal Frager, binutils, eager
Cc: ibai.erkiaga-elorza, nagaraju.mekala, mark.hatle,
sadanand.mutyala, appa.rao.nali, vidhumouli.hunsigida,
luca.ceresoli
On 11/10/23 06:27, Nick Clifton wrote:
> Hi Neal,
>
>> This patch adds the R_MICROBLAZE_32_NONE relocation type.
>> This is a 32-bit reloc that stores the 32-bit pc relative
>> value in two words (with an imm instruction).
>
> Patch approved - please apply, but with one small change:
>
>> for (irelscan = irelocs; irelscan < irelscanend; irelscan++)
>> {
>> - if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)
>> + if ((ELF32_R_TYPE (irelscan->r_info) == (int)
>> R_MICROBLAZE_32) ||
>> + (ELF32_R_TYPE (irelscan->r_info) ==
>> + (int) R_MICROBLAZE_32_NONE))
>> {
>
> Formatting: please do not end a line with a logical operator, in this
> case: ||
> Instead please move the operator to the start of the next line.
Patch applied 10/20/23.
Applied patch (commit 364081ef) to fix this and similar formatting
errors.
--
Michael Eager
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-11-10 16:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-17 8:40 [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type Neal Frager
2023-10-17 8:40 ` [PATCH v2 2/2] gas: testsuite: Add microblaze reloc test Neal Frager
2023-11-10 14:28 ` Nick Clifton
2023-11-10 16:14 ` Michael Eager
2023-10-20 13:18 ` [PATCH v2 1/2] bfd: microblaze: Add 32_NONE reloc type Frager, Neal
2023-10-20 14:14 ` Michael Eager
2023-11-10 14:27 ` Nick Clifton
2023-11-10 16:31 ` Michael Eager
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).