OLD | NEW |
1 /* | 1 /* |
2 * Mac OS X ABI Mach-O File Format | 2 * Mac OS X ABI Mach-O File Format |
3 * | 3 * |
4 * Copyright (C) 2007 Henryk Richter, built upon xdf objfmt (C) Peter Johnson | 4 * Copyright (C) 2007 Henryk Richter, built upon xdf objfmt (C) Peter Johnson |
5 * | 5 * |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 | 1492 |
1493 msd = yasm_section_get_data(retval, &macho_section_data_cb); | 1493 msd = yasm_section_get_data(retval, &macho_section_data_cb); |
1494 | 1494 |
1495 if (isnew || yasm_section_is_default(retval)) { | 1495 if (isnew || yasm_section_is_default(retval)) { |
1496 yasm_section_set_default(retval, 0); | 1496 yasm_section_set_default(retval, 0); |
1497 msd->segname = data.f_segname; | 1497 msd->segname = data.f_segname; |
1498 msd->sectname = f_sectname; | 1498 msd->sectname = f_sectname; |
1499 msd->flags = flags; | 1499 msd->flags = flags; |
1500 yasm_section_set_align(retval, align, line); | 1500 yasm_section_set_align(retval, align, line); |
1501 } else if (flags_override) { | 1501 } else if (flags_override) { |
1502 // align is the only value used from overrides. | 1502 /* align is the only value used from overrides. */ |
1503 if (yasm_section_get_align(retval) != align) { | 1503 if (yasm_section_get_align(retval) != align) { |
1504 yasm_warn_set(YASM_WARN_GENERAL, | 1504 yasm_warn_set(YASM_WARN_GENERAL, |
1505 N_("section flags ignored on section redeclaration")); | 1505 N_("section flags ignored on section redeclaration")); |
1506 } | 1506 } |
1507 } | 1507 } |
1508 return retval; | 1508 return retval; |
1509 } | 1509 } |
1510 | 1510 |
1511 static /*@observer@*/ /*@null@*/ yasm_symrec * | 1511 static /*@observer@*/ /*@null@*/ yasm_symrec * |
1512 macho_objfmt_get_special_sym(yasm_object *object, const char *name, | 1512 macho_objfmt_get_special_sym(yasm_object *object, const char *name, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1619 NULL, /* no directives */ | 1619 NULL, /* no directives */ |
1620 NULL, /* no standard macros */ | 1620 NULL, /* no standard macros */ |
1621 macho64_objfmt_create, | 1621 macho64_objfmt_create, |
1622 macho_objfmt_output, | 1622 macho_objfmt_output, |
1623 macho_objfmt_destroy, | 1623 macho_objfmt_destroy, |
1624 macho_objfmt_add_default_section, | 1624 macho_objfmt_add_default_section, |
1625 macho_objfmt_init_new_section, | 1625 macho_objfmt_init_new_section, |
1626 macho_objfmt_section_switch, | 1626 macho_objfmt_section_switch, |
1627 macho_objfmt_get_special_sym | 1627 macho_objfmt_get_special_sym |
1628 }; | 1628 }; |
OLD | NEW |