%{static|static-libgcc|static-libgcobol:%:replace-outfile(-lgcobol libgcobol.a%s)}\
%{static|static-libgcc|static-libstdc++|static-libgfortran:%:replace-outfile(-lgomp libgomp.a%s)}\
%{static|static-libgcc|static-libstdc++:%:replace-outfile(-lstdc++ libstdc++.a%s)}\
+ %{static|static-libga68:%:replace-outfile(-lga68 libga68.a%s)}\
%{static|static-libgm2:%:replace-outfile(-lm2pim libm2pim.a%s)}\
%{static|static-libgm2:%:replace-outfile(-lm2iso libm2iso.a%s)}\
%{static|static-libgm2:%:replace-outfile(-lm2min libm2min.a%s)}\
#undef BTF_INFO_SECTION_NAME
#define BTF_INFO_SECTION_NAME "__CTF_BTF,__btf,regular,debug"
+/* Algol68 */
+#undef A68_EXPORT_SECTION_NAME
+#define A68_EXPORT_SECTION_NAME "__a68_exports"
+
#endif /* CONFIG_DARWIN_H */
char *name;
off_t secoffset;
size_t secsize;
- int l;
sechdr = secdata + i * sechdrsize;
}
}
+ memset (namebuf, 0, sizeof (namebuf));
+ /* Copy the section name so we can append a null to make it into a
+ c-string (Mach-o section names are not terminated). */
+ memcpy (namebuf, sechdr + sectname_offset, MACH_O_NAME_LEN);
+ namebuf[MACH_O_NAME_LEN] = '\0';
+ name = &namebuf[0];
+ /* Maybe override this if we have long section name extension. */
if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0)
{
- memcpy (namebuf, sechdr + sectname_offset, MACH_O_NAME_LEN);
- namebuf[MACH_O_NAME_LEN] = '\0';
-
- name = &namebuf[0];
if (strtab != NULL && name[0] == '_' && name[1] == '_')
{
unsigned long stringoffset;
}
}
}
- else
- {
- /* Otherwise, make a name like __segment,__section as per the
- convention in mach-o asm. */
- name = &namebuf[0];
- memcpy (namebuf, (char *) sechdr + segname_offset, MACH_O_NAME_LEN);
- namebuf[MACH_O_NAME_LEN] = '\0';
- l = strlen (namebuf);
- namebuf[l] = ',';
- memcpy (namebuf + l + 1, (char *) sechdr + sectname_offset,
- MACH_O_NAME_LEN);
- namebuf[l + 1 + MACH_O_NAME_LEN] = '\0';
- }
simple_object_mach_o_section_info (omr->is_big_endian, is_32, sechdr,
&secoffset, &secsize);