This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix Ada bootstrap on darwin


On Friday, December 10, 2004, at 04:18 PM, Richard Henderson wrote:
On Thu, Dec 09, 2004 at 08:35:06AM -0500, Andrew Pinski wrote:
On Darwin common symbols are not allowed in shared/dynamic libraries.
For some reason before a couple of days ago, the Ada runtime library
sources did not produce any common symbols, but after the latest
patches, they produced a couple of common symbols causing this failure.

The change was to use COMMON if a BSS section does not exist. Does MACH-O really not have one of those?

Nope. It has zerofill, which is close, but it combines name and section... I was thinking something like the below would be good, but as I recall, there were some issues discovered by the testsuite with it.


If someone wants to try it out... I think this takes us in the right direction...

''Doing diffs in config/darwin.h.~1~:
*** config/darwin.h.~1~ Wed Dec 10 17:22:30 2003
--- config/darwin.h     Thu Jan 22 18:03:20 2004
*************** objc_section_init (void)                        \
*** 712,717 ****
--- 712,729 ----
  #define GLOBAL_ASM_OP ".globl "
  #define TARGET_ASM_GLOBALIZE_LABEL darwin_globalize_label

+ #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGNMENT) \
+ do { \
+ unsigned int localsize = SIZE; \
+ if (localsize == 0) \
+ ++localsize; \
+ if (FILE) \
+ fprintf (FILE, "\t.zerofill __DATA,__bss,"); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, ",%u,%d\n", localsize, \
+ floor_log2 (ALIGNMENT / BITS_PER_UNIT)); \
+ } while (0)
+
/* Emit an assembler directive to set visibility for a symbol. Used
to support visibility attribute and Darwin's private extern
feature. */
--------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]