This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH-H8300] Handling tiny_data attribute
- From: Jim Wilson <wilson at specifixinc dot com>
- To: "Asgari J. Jinia" <AsgariJ at KPITCummins dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Apr 2004 23:39:22 -0700
- Subject: Re: [PATCH-H8300] Handling tiny_data attribute
- References: <4A1BE23A7B777442B60F4B4916AE0F1335B4A0@sohm.kpit.com>
Asgari J. Jinia wrote:
Following patch was created by Grant Edwards for gcc 3.3 branch.
I have made it suitable for gcc 3.4-20040325 sources. Can it be
applied to current gcc-3.4 branch and mainline?
We need a copyright assignment from Grant Edwards then. I believe KPIT
Cummins has a blanket assignment, so your contribution is OK.
h8300_section_type_flags is missing an explanatory comment before it.
It is an old style function definition. We want ISO C prototype-style
function definitions only.
In h8300_handle_tiny_data_attribute, you have a blank line after an open
brace. Two spaces in "size_t plen" should be one.
Changing .tiny sections support won't work without appropriate binutils
support. You need to add the new sections into the linker scripts
first, before modifying gcc. Otherwise, this feature will stop working.
There are also timing/documentation issues, since you need to wait for
a binutils release, and/or document the dependence on the binutils change.
It might be easier to provide default section flags for the tiny section
rather than letting gcc compute them. That way you wouldn't have to
split it into 3 sections, and hence would not need linker script
changes. I don't know if this is feasible, I did not check.
Grepping, I do not see any targets which use flag_data_sections, so
checking it in h8300.c seems wrong. Maybe there is a way to get the
machine independent code to do this for us?
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com