Support MIPS elfoabi target
Fu, Chao-Ying
fu@mips.com
Wed May 7 20:53:00 GMT 2008
Hi,
I found out that MIPS *-elf and *-elfoabi targets use different section
alignment, due to the check of TARGET_OS in tc-mips.c.
Should we use "strncmp (TARGET_OS, "elf", 3)" to match both
"elfoabi" and "elf", instead of "strcmp (TARGET_OS, "elf")"?
Also, in "gas/configure.in", should we use "mips-*-*-elf*",
instead of "mips-*-*-elf"?
Thanks!
Regards,
Chao-ying
gas/ChangeLog
2008-05-07 Chao-ying Fu <fu@mips.com>
* configure.in: Use mips-*-*-elf* to match elfoabi.
* configure: Regenerate.
* config/tc-mips.c (md_begin): Use strncmp to match elf and elfoabi.
(mips_ip): Likewise.
(s_change_sec): Likewise.
(md_section_align): Likewise.
Index: gas/configure
===================================================================
RCS file: /cvs/src/src/gas/configure,v
retrieving revision 1.231
diff -r1.231 configure
11026c11026
< mips-*-*-elf) case "$endian" in
---
> mips-*-*-elf*) case "$endian" in
Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.204
diff -r1.204 configure.in
402c402
< mips-*-*-elf) case "$endian" in
---
> mips-*-*-elf*) case "$endian" in
Index: gas/config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.383
diff -r1.383 tc-mips.c
1960c1960
< if (strcmp (TARGET_OS, "elf") != 0
---
> if (strncmp (TARGET_OS, "elf", 3) != 0
1983c1983
< if (strcmp (TARGET_OS, "elf") != 0)
---
> if (strncmp (TARGET_OS, "elf", 3) != 0)
9555c9555
< if (IS_ELF && strcmp (TARGET_OS, "elf") != 0)
---
> if (IS_ELF && strncmp (TARGET_OS, "elf", 3) != 0)
12178c12178
< if (strcmp (TARGET_OS, "elf") != 0)
---
> if (strncmp (TARGET_OS, "elf", 3) != 0)
12190c12190
< if (strcmp (TARGET_OS, "elf") != 0)
---
> if (strncmp (TARGET_OS, "elf", 3) != 0)
13279c13279
< if (strcmp (TARGET_OS, "elf") == 0)
---
> if (strncmp (TARGET_OS, "elf", 3) == 0)
More information about the Binutils
mailing list