| 1 |
/* Overrides for elfos.h for AVR 8-bit microcontrollers. |
| 2 |
Copyright (C) 2011-2025 Free Software Foundation, Inc. |
| 3 |
Contributed by Georg-Johann Lay ([email protected]) |
| 4 |
|
| 5 |
This file is part of GCC. |
| 6 |
|
| 7 |
GCC is free software; you can redistribute it and/or modify |
| 8 |
it under the terms of the GNU General Public License as published by |
| 9 |
the Free Software Foundation; either version 3, or (at your option) |
| 10 |
any later version. |
| 11 |
|
| 12 |
GCC is distributed in the hope that it will be useful, |
| 13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
GNU General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with GCC; see the file COPYING3. If not see |
| 19 |
<http://www.gnu.org/licenses/>. */ |
| 20 |
|
| 21 |
/* defaults.h requires HAVE_INITFINI_ARRAY_SUPPORT to be present |
| 22 |
in order for attribute "retain" to be recognized. This is due |
| 23 |
to some quirks in crtstuff.h -- which isn't even used by avr. |
| 24 |
All we need is that Binutils supports the "R"etain section flag. |
| 25 |
If that's the case, define SUPPORTS_SHF_GNU_RETAIN so that |
| 26 |
defaults.h doesn't define it to 0. */ |
| 27 |
#if defined(IN_GCC) && !defined(USED_FOR_TARGET) && !defined(GENERATOR_FILE) |
| 28 |
#include "auto-host.h" /* HAVE_GAS_SHF_GNU_RETAIN */ |
| 29 |
#if HAVE_GAS_SHF_GNU_RETAIN |
| 30 |
#undef SUPPORTS_SHF_GNU_RETAIN |
| 31 |
#define SUPPORTS_SHF_GNU_RETAIN 1 |
| 32 |
#endif |
| 33 |
#endif |
| 34 |
|
| 35 |
/* Overriding some definitions from elfos.h for AVR. */ |
| 36 |
|
| 37 |
#undef PCC_BITFIELD_TYPE_MATTERS |
| 38 |
|
| 39 |
#undef MAX_OFILE_ALIGNMENT |
| 40 |
#define MAX_OFILE_ALIGNMENT (32768 * 8) |
| 41 |
|
| 42 |
#undef STRING_LIMIT |
| 43 |
#define STRING_LIMIT ((unsigned) 64) |
| 44 |
|
| 45 |
/* Be conservative in crtstuff.c. */ |
| 46 |
#undef INIT_SECTION_ASM_OP |
| 47 |
#undef FINI_SECTION_ASM_OP |
| 48 |
|
| 49 |
#undef ASM_DECLARE_FUNCTION_NAME |
| 50 |
#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \ |
| 51 |
avr_declare_function_name (STREAM, NAME, DECL) |