lkml.org 
[lkml]   [2006]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: How can I link the kernel with libgcc ?
    Carlos Munoz wrote:

    > Lee Revell wrote:
    >
    >> On Thu, 2006-03-09 at 20:45 -0500, Valdis.Kletnieks@vt.edu wrote:
    >>
    >>
    >>> On Thu, 09 Mar 2006 17:44:16 PST, Carlos Munoz said:
    >>>
    >>>
    >>>> I'm writing an audio driver and the hardware requires floating
    >>>> point arithmetic. When I build the kernel I get the following
    >>>> errors at link time:
    >>>>
    >>>
    >>> Tough break, that. You sure you can't figure a way to either push the
    >>> floating point out to userspace
    >>>
    >>
    >>
    >> Audio drivers should never have to directly manipulate the samples -
    >> they just manage the DMA buffers and interrupts and wake up the process
    >> at the right time. Mixing, routing, volume control, DSP go in
    >> userspace.
    >>
    >> Lee
    >>
    >>
    >>
    > Hi Lee,
    >
    > Unfortunately, the driver needs to populate several coefficient tables
    > for the hardware to perform silence suppression and other advance
    > features. The values for these tables are calculated using log10
    > operations. I don't see a clean way to push these operations to user
    > space without the need for custom applications that build the tables
    > and pass them to the driver.
    >
    > Thanks,
    >
    >
    > Carlos Munoz
    >
    Anyway,

    I figured out how to get the driver to use floating point operations. I
    included source code (from an open source math library) for the log10
    function in the driver. Then I added the following lines to the file
    arch/sh/kernel/sh_ksyms.c:

    DECLARE_EXPORT(__subdf3);
    DECLARE_EXPORT(__muldf3);
    DECLARE_EXPORT(__divdf3);
    DECLARE_EXPORT(__adddf3);
    DECLARE_EXPORT(__floatsidf);
    DECLARE_EXPORT(__eqdf2);
    DECLARE_EXPORT(__fixdfsi);

    Everything works now.

    Thanks,


    Carlos Munoz
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-03-10 04:25    [W:0.022 / U:2.876 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site