• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修訂5f4ce26d93f3ab6eb1f46eef54d091d18fd73549 (tree)
時間2000-10-28 07:39:05
作者Phil Blundell <philb@gnu....>
CommiterPhil Blundell

Log Message

2000-10-27 Philip Blundell <philb@gnu.org>

* elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
attempts to mix PIC code with non-PIC, just mark the output as
being position dependent.
(elf32_arm_merge_private_bfd_data): Likewise. Print an error
message for EF_SOFT_FLOAT mismatches. Display diagnostics for
all mismatches, not just the first one.

Change Summary

差異

--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
1+2000-10-27 Philip Blundell <philb@gnu.org>
2+
3+ * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
4+ attempts to mix PIC code with non-PIC, just mark the output as
5+ being position dependent.
6+ (elf32_arm_merge_private_bfd_data): Likewise. Print an error
7+ message for EF_SOFT_FLOAT mismatches. Display diagnostics for
8+ all mismatches, not just the first one.
9+
110 2000-10-23 Philip Blundell <pb@futuretv.com>
211
312 From 2000-05-23 H.J. Lu <hjl@gnu.org>
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -1933,10 +1933,6 @@ elf32_arm_copy_private_bfd_data (ibfd, obfd)
19331933
19341934 if (elf_flags_init (obfd) && in_flags != out_flags)
19351935 {
1936- /* Cannot mix PIC and non-PIC code. */
1937- if ((in_flags & EF_PIC) != (out_flags & EF_PIC))
1938- return false;
1939-
19401936 /* Cannot mix APCS26 and APCS32 code. */
19411937 if ((in_flags & EF_APCS_26) != (out_flags & EF_APCS_26))
19421938 return false;
@@ -1956,6 +1952,10 @@ Warning: Clearing the interwork flag in %s because non-interworking code in %s h
19561952
19571953 in_flags &= ~EF_INTERWORK;
19581954 }
1955+
1956+ /* Likewise for PIC, though don't warn for this case. */
1957+ if ((in_flags & EF_PIC) != (out_flags & EF_PIC))
1958+ in_flags &= ~EF_PIC;
19591959 }
19601960
19611961 elf_elfheader (obfd)->e_flags = in_flags;
@@ -1973,6 +1973,7 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
19731973 {
19741974 flagword out_flags;
19751975 flagword in_flags;
1976+ boolean flags_compatible = true;
19761977
19771978 if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
19781979 || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -2024,48 +2025,59 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
20242025 return true;
20252026 }
20262027
2027- /* Check flag compatibility. */
2028+ /* Identical flags must be compatible. */
20282029 if (in_flags == out_flags)
20292030 return true;
20302031
2031- /* Complain about various flag mismatches. */
2032+ /* If any of the input BFDs is non-PIC, the output is also position
2033+ dependent. */
2034+ if (!(in_flags & EF_PIC))
2035+ elf_elfheader (obfd)->e_flags &= ~EF_PIC;
20322036
2037+ /* Complain about various flag mismatches. */
20332038 if ((in_flags & EF_APCS_26) != (out_flags & EF_APCS_26))
2034- _bfd_error_handler (_ ("\
2039+ {
2040+ _bfd_error_handler (_ ("\
20352041 Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"),
20362042 bfd_get_filename (ibfd),
20372043 in_flags & EF_APCS_26 ? 26 : 32,
20382044 bfd_get_filename (obfd),
20392045 out_flags & EF_APCS_26 ? 26 : 32);
2046+ flags_compatible = false;
2047+ }
20402048
20412049 if ((in_flags & EF_APCS_FLOAT) != (out_flags & EF_APCS_FLOAT))
2042- _bfd_error_handler (_ ("\
2050+ {
2051+ _bfd_error_handler (_ ("\
20432052 Error: %s passes floats in %s registers, whereas %s passes them in %s registers"),
20442053 bfd_get_filename (ibfd),
20452054 in_flags & EF_APCS_FLOAT ? _ ("float") : _ ("integer"),
20462055 bfd_get_filename (obfd),
20472056 out_flags & EF_APCS_26 ? _ ("float") : _ ("integer"));
2057+ flags_compatible = false;
2058+ }
20482059
2049- if ((in_flags & EF_PIC) != (out_flags & EF_PIC))
2050- _bfd_error_handler (_ ("\
2051-Error: %s is compiled as position %s code, whereas %s is not"),
2052- bfd_get_filename (ibfd),
2053- in_flags & EF_PIC ? _ ("independent") : _ ("dependent"),
2054- bfd_get_filename (obfd));
2055-
2056- /* Interworking mismatch is only a warning. */
2057- if ((in_flags & EF_INTERWORK) != (out_flags & EF_INTERWORK))
2060+ if ((in_flags & EF_SOFT_FLOAT) != (out_flags & EF_SOFT_FLOAT))
20582061 {
20592062 _bfd_error_handler (_ ("\
2063+Error: %s uses %s floating point, whereas %s uses %s floating point"),
2064+ bfd_get_filename (ibfd),
2065+ in_flags & EF_SOFT_FLOAT ? _("soft") : _("hard"),
2066+ bfd_get_filename (obfd),
2067+ out_flags & EF_SOFT_FLOAT ? _("soft") : _("hard"));
2068+ flags_compatible = false;
2069+ }
2070+
2071+ /* Interworking mismatch is only a warning. */
2072+ if ((in_flags & EF_INTERWORK) != (out_flags & EF_INTERWORK))
2073+ _bfd_error_handler (_ ("\
20602074 Warning: %s %s interworking, whereas %s %s"),
20612075 bfd_get_filename (ibfd),
20622076 in_flags & EF_INTERWORK ? _ ("supports") : _ ("does not support"),
20632077 bfd_get_filename (obfd),
20642078 out_flags & EF_INTERWORK ? _ ("does not") : _ ("does"));
2065- return true;
2066- }
20672079
2068- return false;
2080+ return flags_compatible;
20692081 }
20702082
20712083 /* Display the flags field */